Lab Assignment

Total assignment value: 25 points
  1. (3 points) Write a perl script to show all accounts which have a UID that is equal to zero.
  2. (3 points) Write a perl script which shows all accounts which have a UID or a GID of zero.
  3. (3 points) Write a perl script to display all lines from /etc/passwd which do not have a GECOS comment.
  4. (8 points) Write a perl script to read /etc/group, and determine how many groups have more than one username listed as a member. Print out a listing of all groupnames which have more than one member
  5. (8 points) Write a perl script to read in the output of the last command, and show a count of how many times each username has logged in. You'll want to use a hash for this, most likely. You can get sample data from the file at http://ccis2161.linux-classes.com/labs/last.data