Difference between revisions of "OPS235 Assignment 1/Fall 2011"

From CDOT Wiki
Jump to: navigation, search
(Created page with '== OPS235 Assignment 1 - Fall 2011 - Chris Tylers' Section Only == '''This version of the assignment applies only to section B during Fall 2011, taught by Chris Tyler.''' Weigh…')
 
(OPS235 Assignment 1 - Fall 2011 - Chris Tylers' Section Only)
Line 10: Line 10:
  
 
In this assignment, you will be creating a script and a corresponding system configuration that will allow you to easily manage users.
 
In this assignment, you will be creating a script and a corresponding system configuration that will allow you to easily manage users.
 +
 +
== Due Date ==
 +
 +
This assignment is due at the start of class on Friday, November 18.
  
 
=== Before You Begin ===
 
=== Before You Begin ===

Revision as of 09:44, 9 November 2011

OPS235 Assignment 1 - Fall 2011 - Chris Tylers' Section Only

This version of the assignment applies only to section B during Fall 2011, taught by Chris Tyler.

Weight: 5% of the overall grade.

Purpose and Goal

This assignment provides an opportunity to learn some additional system administration concepts and skills.

In this assignment, you will be creating a script and a corresponding system configuration that will allow you to easily manage users.

Due Date

This assignment is due at the start of class on Friday, November 18.

Before You Begin

Make a full and complete backup of any configuration file that you're going to change. It's a good idea to fully back-up your virtual machines as well as the /etc directory of your f13host system.

You may choose to create the script and system configuration on any of your virtual machines. Do not use your f13host.

The Script

Create a script named newuser with these qualities:

  1. The script is normally run with three arguments: a username, a password, and a role. The username can be any valid username not already in use on the system; the password can be any valid password; and the role must be one of "user", "software-manager", "backup-manager", "vm-manager", "storage-manager", or "administrator".
  2. When the script is run, it must create the requested user account with the requested password and role settings.
  3. The role values correspond to these capabilities:
    • user - no special abilities
    • software-manager - can use the yum and rpm commands via sudo without a password
    • backup-manager - can use the tar command as root via sudo without a password
    • vm-manager - can use the virsh command as root via sudo without a password
    • storage-manager - can use all of the LVM commands plus fdisk, mkdir, and mkfs commands as root without a password, and can edit the /etc/fstab file as a regular user
    • administrator - can run any command as root via sudo with their regular user password
  4. Ensure that the root user can run the script without taking any special steps. For example, the root user should be able to type this command regardless of which directory they are in: newuser jdoe 123abc vm-manager

The System Configuration

Configure your system to work with the above script (e.g., group configuration). In addition:

  1. A compressed backup of your /etc directory is made every hour from 8 am to 6 pm, Tuesday through Saturday. The compressed backup is stored in the file /var/backup/etc.tgz

Testing Your Configuration

Record the commands used to perform this testing as well as the output generated.

Create some test user accounts using your script. Perform the following tasks to ensure that the various roles work correctly:

  1. Add the RPMFusion yum repositories to your system. Test that you can install software from RPMFusion using an account with the "software-manager" role.
  2. Create a backup of /home using an account with the "backup-manager" role.
  3. Create a new virtual machine and install one of the following versions of Linux in the virtual machine:
    • If the last digit of your student ID is 0, install Ubuntu
    • If the last digit of your student ID is 1, install Kubuntu
    • If the last digit of your student ID is 2, install Edubuntu
    • If the last digit of your student ID is 3, install Lubuntu
    • If the last digit of your student ID is 4, install Fedora 16
    • If the last digit of your student ID is 5, install Linux Mint
    • If the last digit of your student ID is 6, install OpenSUSE
    • If the last digit of your student ID is 7, install Debian
    • If the last digit of your student ID is 9, install CentOS
  4. Confirm that a user account with the "vm-manager" role can start and stop the virtual machine into which you have installed the other version of Linux.
  5. Add a virtual disk to your VM. Using a user account with the "storage-manager" role, partition that disk, add it to the existing PV, and create a new logical volume which any user can mount or unmount at the /assignment1 mountpoint.
  6. Confirm that the "administrator" role functions as expected.
  7. Confirm that the backups of the /etc directory as being correctly performed.

Submitting your Assignment

The assignment will be marked in person on Friday, November 18. Come prepared with your disk pack fully configured to the assignment specification.

On November 18 you will be given a set of tasks to perform to prove that your system is configured correctly. The evidence of successful completion of those tasks will be used to assign your mark.

Tips

  1. Read the manpages for:
    • sudo
    • visudo
    • cron
    • yum
    • rpm
  2. Use user groups to manage the account roles.