MS-373
Advanced Unix
Lab 2

Date:    Thursday, December 8, 2005
Due:     Thursday, December 15, 2005

Superuser and "Rootly" Powers

The purpose of this lab is to investigate the power of "root", the superuser on Unix and Linux systems.

  1. How do you go about getting a root shell on Debian Ubuntu?

  2. Assuming you have a root shell, how would you gracefully bring the system down?  List all the steps to take to do this.

  3. Use the find command with the -perm option to locate a dozen files with the setuid enabled on your system.  For each file, explain why the setuid mechanism is necessary for the command to function properly.  Suppose the find command does not work in locating files with the setuid bit on.  How would you accomplish this search using the ls -l and grep commands (i.e. use regular expressions to process the long listing output from ls).

Limiting Root Powers:  sudo

  1. Print out the contents of your /etc/sudoers file and explain what's going on in it.

  2. Create two entries for the sudoers configuration file:

    One entry is to allow users matt, adam and drew to service the printer via the lpr and lprm commands.

    One entry is to allow drew, smith and lane to kill jobs and reboot any machines on the local Unix network.

    Use both user aliases and command aliases in the sudoers file to accomplish these tasks.  Show the complete contents of your /etc/sudoers file in the report