CS209-01 Summer 1 2005 - Lab 4 / HW 3
Due: e-mail by
Wed Jun 8 at 11:59 PM
Points: 100 pts total
- read man page on all the commands below that we covered in class (try them while reading)
describe what is each command / daemonfor. Choose 3 different options for each command listed
and discuss when and why would you use them. Provide an example for each case.
fdisk
umask
useradd
usermod
userdel
pwconv
newgrp
grunpconv
crontab
at
- create user "John Class" without using useradd, groupadd,
or any other high level program
login name: jclass
home directory: /cs209/jclass
everything else : choose and discuss your choices -what did you do, how and why
log into the system as jclass
in your report list all the steps needed to add the user above
- as user jclass write both rotate scripts as discussed in the class
try them
modify them so that the log files are in /cs209/jclass/logs/
- create crontab entries for jclass that will run the rotate scripts every 10 minutes:
rotate.csh 0,10,20,...
rotate.sh 5,15,25,..
once all running how far back will the log files go ?
modify the scripts and crontab so that each file contains info for a whole day and
you can check the logs 2 weeks back and also
each script identifies itself
- create another script (sh or csh) and entry in the crontab for jclass
that will append info below to the log file every minute:
current date and time
current load and users logged in
all processes running on the machine (long listing)
information about disk partitions (how much disk space is used in KBytes - df)
- while working on your lab machine create EXT2 file system on a floppy disk
and copy all files you created or modified on it while preserving
the directory tree structure and file attributes
(/etc/fstab will be etc/fstab on a floppy):
passwd, shadow, fstab, jclass's home dir,..
describe ALL steps
- submit the floppy disk together with your report
you can also attach the files to your e-mail
+ add directory listing from floppy (ls -alR)
- Do these exercises from the book:
E6.1
E6.2
E6.3
E8.2