CH 07 Lab-Answers
CH 07 Lab-Answers
1. Log as root
2. Add a new user named alexa and set her password
New password:
3. Add a new user named maria including her full name Maria Smith and set her password
alex:x:500:500::/home/alex:/bin/bash
alexa:x:501:501::/home/alexa:/bin/bash
maria:x:502:502:Maria Smith:/home/maria:/bin/bash
bob:x:503:503::/home/bob:/bin/bash
andrew:x:504:504::/home/andrew:/bin/bash
mario:x:505:505::/home/mario:/bin/bash
9. Add the users alexa , maria and bob to the marketing group
10. Add the users andrew , mario and bob to the accounting group.
mario:x:505:
marketing:x:506:alexa,maria,bob
accounting:x:507:bob,andrew,mario
[root@server3 ~]#
12. Delete the user account of alexa and verify that her home directory has not been removed
13. Delete the user account and the home directory of mario and verify that both the account
and the home directory of mario have been deleted
maria:x:502:502:Maria Clark:/home/maria:/bin/bash
[root@server3 ~]#
15. Verify who are the users members of the groups marketing and accounting
marketing:x:506:maria,bob
accounting:x:507:bob,andrew
[root@server3 ~]#
alex:x:500:
maria:x:502:
bob:x:503:
andrew:x:504:
accounting:x:507:bob,andrew
[root@server3 ~]#
17. Change the name of the group accounting to account_group and verify the change
alex:x:500:
maria:x:502:
bob:x:503:
andrew:x:504:
account_group:x:507:bob,andrew
[root@server3 ~]#
[root@server3 ~]#
bob : bob
[root@server3 ~]#
New password:
New password:
Retype new password:
[root@server3 ~]#
23. Exit then login again as maria or bob to verify the password change