Project: Managing Users¶
In this project, you will create and manage user accounts, and practice common services required to administer users on a shared Linux host. These activities include:
Creating User Accounts
Resetting a forgotten password
Modifying a user’s uid or gid
Locking an account
Customizing a login environment
Deleting a user Account
This project comes with a grading script written by my predecessor Jim Griffin. You can fetch it using this link:
Create four new groups for your computer with the following names and group IDs:
Creating User Accounts¶
Create five new user accounts using the following names and information:
Full name: CIS191
Add this account to the wizards group
Full name: Frodo Baggins
Full name: Smeagol
Full name: Legolas of Mirkwood
Full name: Gimli son of Gloin
The password for all of the above accounts should be
Cabri11o. Do not create private groups for users other than
cis191, but do take in the following considerations:
Gollum wants his home directory to be named
All home directories should be created in the
Legolas wants his shell to be zsh
Gimli doesn’t want to have a password. (If you can grant his wish, do so.)
Be sure you can login to each account.
Resetting a forgotten password¶
Frodo forgot his password. You must reset it to Baggins and force him to change it the next time he logs in.
Modifying a user’s name/identity¶
Change Frodo’s GID to be the users group, but make sure he retains his membership in the hobbit group.
Legolas wants his username changed to glorfindel
Gimli needs his UID changed to 1800. (Make certain that Gimli can still log in and access and create files after this change has been made.
Locking an Account¶
Glorfindel (a.k.a. Legolas) has been engaged in suspicious activity. You must lock his account.
Customizing a login environment¶
/etc/issuefile so that the first line says “Middle Earth Linux 1.0.”.
/etc/motdfile to include an announcement that this class is CIS 191 and that all activity on this computer is closely monitored.
Gimli is confused by all the messages that come to the screen when he logs on. Configure his account so that no messages are displayed on the screen when he logs in. Hint: search for hush login using Google.
Deleting a user Account¶
Gollum has passed away, and his account must be removed. However, do not remove his home directory until you archive it to the
/var/preserve directory and name it
Run the program,
user_accounts_and_groups.sh until you are satisfied with the results. Save the results by redirecting to a file called
grader_output.txt and submit the file on Canvas.
$ sudo /vagrant/user_accounts_and_groups.sh > /vagrant/grader_output.txt