CS 480-M01 Linux System Administration - CRN 60315 - Fall 2021
[Home]     [Syllabus]     [Notes]     [Grades]

HW 3 - CS 480 M01 Fall 2021

CS 480 M01 Fall 2022 - Homework Assignment #3

Due: 11:59 PM Sep 24 2022
Assignment:


Points: 80 points total

  1. 20 points : Read all man pages listed below (from sections 1 , 5, or 8; try the commands, look into the files, ... while reading) and in a short paragraph (3-5 lines per man page in your words - do not just copy parts of the man page) describe what is each of them for. Also, for the commands choose an extra option (not the help nor version options) and in few more lines describe situations in which you would use the selected option. In case of the commands with long man pages and many options choose at least two extra options and describe situations in which you would use them.
    1. chmod
    2. chown
    3. crontab ( command )
    4. getfacl
    5. ln
    6. login.defs
    7. newgrp
    8. passwd (command)
    9. passwd (file)
    10. shadow (file)
    11. setfacl
    12. umask
    13. useradd
    14. userdel
    15. usermod
    16. vipw

Each exercise below is to be implemented on your cs480 virtual host. Every question asked needs to be answered in your assignment report. For every exercise below describe in sufficient detail the whole process and explain what you did to accomplish the task. Make sure that you list and discuss all important steps made, commands used together with their options, and problems encountered.

You cannot use yast to accomplish any of the tasks below.

  1. 5 points :
    Describe how is a user's default(=primary) group determined.
    On your cs480 virtual computer create new group "hwgrp480" and make it the default group for user bob.
  2. 6 points
    Local user jim has been abusing his crontab privileges by running expensive tasks at frequent intervals. After asking him to stop several times, you are forced to revoke his privileges. List the steps needed to delete his current crontab and make sure he can't add a new one. Implement your solution on your cs480 virtual machine, and test it to make sure that it works.
  3. 8 points
    Write a simple Perl script that processes the output of ps aux to determine the total VSZ and RSS of the processes running on the system.
    Write and execute the script on your cs480 virtual host and submit a transcript of the session showing your program computing the totals correctly.
  4. 8 points
    On your CS480 VM create user "John Class" without using yast, useradd, groupadd, or any other high level program (edit related files, create directories, copy files, change permissions and ownerships, ... You can use the passwd command to set user's password)
  5. 8 points :
    There was new directory created (/hw3playground/) on your cs480 VM:
            # ls -al /hw3playground/
    	total 0
    	drwxr-xr-x 1 root root  12 Sep 20 12:55 .
    	drwxr-xr-x 1 root root 172 Sep 20 12:58 ..
    	drwx------ 1 root root   0 Sep 20 12:55 bob
    	drwxr-xr-x 1 root root   0 Sep 20 12:55 tmp
    Your task is to change permissions so that
    1. Every user can write into (create new files in) /hw3playground/tmp but cannot delete files that belong to other users.
    2. Apart from root only bob can create files in /hw3playground/bob and only user joe and group ntadmin can list and access files there.
    At the same time root:root must remain the owner of all of these 3 directories (/hw3playground, /hw3playground/bob, and /hw3playground/tmp).
  6. 5 points :
    Create new directory /cs480home and modify your system's settings to make it the default directory where new user's home directories will be created when using command useradd (unless the -b or -d options are specified). Test it by creating new user hw4user (created by command useradd). Make sure that the home directory is created correctly.

NOTE: Your solutions to all of the exercises above must be implemented, tested, and execute correctly on your cs480 virtual machine. Among your attachments (as part of the tar.bz2 file) submit also transcript files showing the correct execution of the commands / scripts as you executed them on your cs480 virtual machine. You can use the script command to record the session and submit the resulting files (3.5_transcript.txt, ...) with your homework assignment as part of your bz2 file submited into your directory under /home/CS480 (wthin the cs.nmsu.edu domain).

Submitted files, overall quality, length, and feedback:

  1. 5 pts : Submit all relevant files you modified during the lab (into the /home/CS480/yourcsloginname directory as part of the tar.bz2 file) . Exactly two files need to be submitted: One file being your report in PDF is to be submitted on the Blackboard. The other file is the tar.bz2 file containing everything else and it gets submitted into /home/CS480 (Pack the files together using tar and bzip2, and copy them using scp from your computer into your cs account )
  2.  10 pts - Submit your report as a PDF document through learn.nmsu.edu and all supporting documents, programs, and execution transcripts as part of the tar.bz2 file in your directory under /home/CS480. The report has to contain answers to all questions above, and for the practical problems on your computer describe in detail choices you made, difficulties you encountered, and how did you deal with them.
  3. 5 pts - Feedback:In the last paragraph of your report estimate how much time you spent on this assignment. Describe what was hard, easy, interesting, boring or confusing.

Please remember the submission requirements: