Task 1:
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.
(grep -i (username) (passwd location) ) is the command for this step.

3. Create a new user named xxxxx and explicitly use options to create the home directory
/home/xxxxx for this user.
( sudo useradd -m (name) creates a new user )
4. Set a password for the new user.
( sudo passwd (username), then enter password twice )

5. Set bash shell as the default login shell for the new user xxxxx, then verify the change.
(sudo tail (file) will print the last 10 entries in the file)

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.
(Screenshot includes steps of prior 3 tasks)
(sudo usermod (modifiers) sudo (username) allows for system config changes to a specific user. In this case, we added the user to the sudo group)
(sudo grep (modifier) (username) (file location) to check user’s information as confirmation)
(Finally, we login as the user to test it)

Task B:
1. Return to your home directory and determine the shell you are using.
(cd is used to change directory)

2. Display the current user’s ID and group membership.
(id (username) displays the user’s groups/group id’s)
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.
( groups (user) shows groups for the user while ls -l (file) shows who has access to a certain file)

5. Create a new group named test and use your UIN as the GID.
( sudo groupadd -g (group ID) (name) creates a new group )
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.
(sudo groupmod (mod) (new name) (old name) lets you change the name of the group)
(sudo usermod (mod) (group) (user) adds a user to a group)

9. Create a new file testfile in the account’s home directory, then change the group owner to
newtest.
(touch (file) creates a new file in current location. For context, ls (file location) shows the files in that folder)
(sudo chgrp (group) (file) changes the file’s group owner to a new group)


10. Display the user owner and group owner information of the file testfile.
(ls -l (file) shows info about a file)

11. Delete the newtest group, then repeat the previous step. What do you find?
(sudo groupdel (name) deletes a group)
12. Delete the user xxxxx along with the home directory using a single command.
