Create the user. groups.
and group membership
1. A group named devgrp
2. user Alex will update password on next login using chage cmd
3. A user Alex who belongs to devgrp as a secondary group,
4. A user Harry who also belongs to devgrp as a primary group
5. A user Jarnes who does not have access to an interactive shell on the system, and who is not a
member of devgrp.
6. Alex. Harry and James should all have the password of shadow.
Commands
1. sudo groupadd devgrp
2. sudo useradd -m -s /bin/bash -G devgrp Alex
3. sudo passwd Alex
4. sudo chage -d 0 Alex
5. sudo useradd -m -s /bin/bash -g devgrp Harry
6. sudo passwd Harry
7. sudo useradd -m -s /bin/nologin James
8. sudo passwd James
9. sudo passwd -d Alex
10. sudo passwd -d Harry
11. sudo passwd -d James
The User Harry must configure a cron job that runs every 30 sec
and executes the date cmd and take the output in a
/home/datetxt file.
Commands
1. crontab –e
2. * * * * sleep 30 && date >> /home/datetxt
3. sudo service cron restart
Add the user Tom and give read permission on /home/datetxt
file using setfacl cmd.
Commands
1. sudo useradd –m -s /bin/bash Tom
2. sudo apt-get update
3. sudo apt-get install acl
4. sudo setfacl -m u:Tom:r /home/datetxt