The purpose of this assignment is to learn (or review) some of the standard
system administration functions on a Linux system, including account
administration, process control, and periodic processes. Use the script
command to capture the output of all commands in R2.log
, for submission at
the end of the recitation.
su root
command (ask TA for the password).
groupadd
to define presidents, governors, mayors, and senators groups.
groupmod
to change the GID for senators.
groupmod
to restore the GID for senators.
groupdel
to delete the senators group.
grep
to search /etc/group for group names and GIDs.
useradd
to add users with the following attributes:
User Name | Home Directory | Password | Shell | Primary Group | Secondary Group |
taft | /home/taft | william | /bin/bash | users | presidents |
wilson | /home/wilson | woodrow | /bin/bash | users | presidents |
lincoln | /home/lincoln | abe | /bin/bash | users | presidents |
adams | /home/adams | john | /bin/bash | users | presidents |
grant | /home/grant | ulysses | /bin/bash | users | presidents |
usermod
to change the shell to /bin/tcsh
for lincoln.
/bin/tcsh
.
su
and passwd
to change the password for grant.
userdel
to delete the grant account.
ps
.
ps
with the -e
, -f
options.
ps
only for root.
pstree
command.
top
command.
top
.
top
with 1s between screen updates.
top
only with your process.
gedit
session and find the associated PID using ps
and grep
.
gedit
session using the kill
command with the SIGKILL signal.
crontab
:
-e
to edit, -l
to list, -r
to remove.
find . -print
command from your home directory into
R2.cron
.
/var/log/cron
.
R2.script
that executes ls -l
in your home directory.
R2.cron
in your home directory.
R2.cron
.
cat
to list R2.script
and R2.cron
into R2.log
.
Terminate the script
command with control-D.
Edit your output to have only the relevant
commands, filtering out all extraneous commands and output.
Add a comment block with your personal information, as follows:
# Students: Student 1, Student 2, ... # Ids: 8xx-xx-xxxx, 8xx-xx-xxxx, ... # Course: CT320 # Assignment: Recitation R2 # Date: YYYY-MM-DD
Turn your file into the Recitation 2 drop box on RamCT. You do not need
to turn in R2.script
or R2.cron
from above, since R2.log
will contain their contents. The lab is done in teams of 2, but each
student must submit to get credit.
Modified: 2013-09-06T12:48 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |