Task A – User Account management (8 * 5 = 40 points)
1. Open a terminal window in VM and execute the correct command to display user account
information (including the login shell and home directory) for the current user using grep.
2. Execute the correct command to display user password information (including the encrypted
password and password aging) for the current user using grep.
3. Create a new user named xxxxx and explicitly use options to create the home directory
/home/xxxxx for this user.
4. Set a password for the new user.
5. Set bash shell as the default login shell for the new user xxxxx, then verify the change.
6. Execute the correct command to display user password information (including the encrypted
password and password aging) for the new user xxxxx using grep.
7. Add the new user xxxxx to sudo group without overriding the existing group membership.
8. Switch to the new user’s account.
Task B – Group account management (12 * 5 = 60 points)
Use Linux commands to execute the following tasks:
1. Return to your home directory and determine the shell you are using.
2. Display the current user’s ID and group membership.
3. Display the group membership of the root account.
4. Run the correct command to determine the user owner and group owner of the /etc/group
File.
5. Create a new group named test and use your UIN as the GID.
6. Display the group account information for the test group using grep.
7. Change the group name of the test group to newtest.
8. Add the current account (xxxxx) as a secondary member of the newtest group without
overriding this user’s current group membership.
9. Create a new file testfile in the account’s home directory, then change the group owner to
Newtest.
10. Display the user owner and group owner information of the file testfile.
11. Delete the newtest group, then repeat the previous step. What do you find?
12. Delete the user xxxxx along with the home directory using a single command.