CIS 191B
Lab 6: User Accounts and Groups

In this lab, you will create and manage user accounts, and practice common services required to administer users on a UNIX/Linux computer.
These activities include:
  1. Creating Groups
  2. Creating User Accounts
  3. Resetting a forgotten password
  4. Modifying a user's uid or gid
  5. Locking an account
  6. Customizing a login environment
  7. Deleting a user Account

Creating Groups

Create four new groups for your computer with the following GIDs:
hobbits	600
elves	700
dwarves	800
wizards	900
Add the cis191 account to the new wizards group

Creating User Accounts

Create four new user accounts using the following names and values: The password for all of the above accounts should be Cabri11o
Do not create private groups, but do take in the following considerations:
  1. Gollum wants his home directory to be named smeagol
  2. All home directories should be created in the /home directory.
  3. Legolas wants his shell to be tcsh
  4. Gimli doesn't want to have a password. (Can you grant his wish?)
After creating the accounts, log in as Frodo and send an email to each of the other accounts welcoming them to Linux. Log in to the other accounts and read the email received from Frodo.

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

  1. Change Frodo's GID to be the users group, but make sure he retains his membership in the hobbit group.
  2. Legolas wants his username changed to glorfindel
  3. Gimli needs his UID changed to 800. (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

  1. Edit the /etc/issue file so that the first line says
    Middle Earth Linux 1.0, and the second line displays the tty line (\l) rather than the machine type (\m).
  2. Edit the /etc/motd file to include an announcement that this class is CIS 191B and that all activity on this computer is closely monitored.
  3. 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.
  4. The prompt in Gimli's shell should be only a single character, the colon, (:).
  5. Gimli's shell must not search for programs in his personal bin directory.

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 gollum.tar.

To Turn In

Run the program, glab6 until you are satisfied with the results. Save the results by redirecting to a file called lab6 and scp that file to your opus account:
scp lab6 logname@opus.cabrillo.edu:
If glab6 is not on your lab machine, you may download it from opus where it resides in the /home/cis191/bin directory.