Updated: 2013-05-08 21:04 EDT
11h00 (11am) Monday April 15, 2013 (start of Week 14)
WARNING: Some inattentive students upload Assignment #12 into the Assignment #11 upload area. Don’t make that mistake! Be exact.
This assignment is based on your weekly Class Notes.
Remember to READ ALL THE WORDS to work effectively and not waste time.
This is an overview of how you are expected to complete this assignment. Read all the words before you start working.
Since I also do manual marking of student assignments, your final mark may not be the same as the mark submitted using the current version of the Checking Program. I do not guarantee that any version of the Checking Program will find all the errors in your work. Complete your assignments according to the specifications, not according to the incomplete set of the mistakes detected by the Checking Program.
When you are finished the tasks, leave the files and directories in place as part of your deliverables. Do not delete any assignment work until after the term is over! Assignments may be re-marked at any time; you must have your term work available right until term end.
All the course notes are always available on the Internet here: CST8207 GNU/Linux Operating Systems I.
All the current and previous terms notes files are also stored on the CLS. You can learn about how to read and search these notes files using the command line on the CLS under the heading Copies of the CST8207 course notes near the bottom of the page Course Linux Server.
All references to the “Source Directory” below are to the CLS directory ~idallen/cst8207/13w/assignment12/
and that name starts with a tilde character “~
” followed by a userid with no intervening slash. The leading tilde indicates to the shell that the pathname starts with the HOME directory of the account idallen
.
On the Course Linux Server, make the directory CST8207-13W/Assignments/assignment12
, in which some information will be stored related to this assignment.
Create the check
symbolic link needed to run the Checking Program, as described in the section Checking Program below.
Complete your Fedora 12 Virtual Machine Installation.
On your Fedora 12 Virtual Machine also create a directory in your own account named CST8207-13W/Assignments/assignment12
(exactly the same directory hierarchy as you created on the CLS)
sudo
IndexAs described in the course notes on Users and Groups, the sudo
command is a safer way to run individual commands with root
permissions, instead of using su
to become the root
user. The sudo
command is configured using file /etc/sudoers
.
Log in to your Fedora 12 machine as your ordinary userid (not root
).
Use the su
command to become the super-user.
Take a word count of the sudo
configuration file. It should say: 95 452 3218
.
Use the visudo
command to edit the sudo
configuration file. (You will need to know how to use the vim
editor, or else you can type EDITOR=nano visudo
to use the nano
editor.)
Search for the comment containing the words run all
and remove the comment character “#
” and space from the start of the line following this comment. That line should now begin with %wheel
and end with the word ALL
.
Save and exit the editor. Run another word count. It should say: 95 451 3216
. (One less word; two fewer characters.)
Use a command to search for the line containing the word wheel
in the group file. You should find a line exactly like this: wheel:x:10:root
Use the correct command to add your ordinary userid to the wheel
group. (You used this same command in a previous lab to add users to the megadeth
group.)
Use a command to search for the line containing the word wheel
in the group file. You should find a line similar to this: wheel:x:10:root,abcd0001
where abcd0001 is your Blackboard userid.
Exit the root
shell you started with su
and return to your regular abcd0001 account shell.
root
) type: sudo whoami
root
password.whoami
should be: root
root
) type: sudo id
sudo
, you will not have to enter your password again, otherwise you will have to re-enter your own password again.id
should show the root
user information.You can use sudo
to safely run any single command that needs root
permissions, instead of using su
to start a root
shell (where you might accidentally damage something by doing everything as root
).
You will need the sudo
command to run the Checking Program.
Review the course notes on Partitions and File Systems.
When you are finished, run the Checking Program to create an overall mark. Submit the output to Blackboard in the correct location.
Since I also do manual marking of student assignments, your final mark may not be the same as the mark submitted using the current version of the Checking Program. I do not guarantee that any version of the Checking Program will find all the errors in your work. Complete your assignments according to the specifications, not according to the incomplete set of the mistakes detected by the Checking Program.
The checking program resides on the Course Linux Server, but your work is on your Fedora 12 Virtual Machine. There is a new Fetch program that you must download and use on your Fedora 12 machine to copy information from your Fedora 12 Virtual Machine to your account on the CLS so that the checking program can check it on the CLS.
Once the Fetch program has fetched these files from your Virtual Machine to the CLS, you can run the checking program on the CLS to check what is saved in the files. When you make changes on your Fedora 12 Virtual Machine, you need to run the Fetch program again to update the saved files on the CLS.
Simply running the checking program on the CLS will not update the saved files on the CLS. You must run the Fetch program when you make changes on your Fedora 12 Virtual Machine.
Do all the following steps on your Fedora 12 Virtual Machine. Read through the whole list before you start typing anything.
root
account (same userid as Blackboard).CST8207-13W/Assignments/assignment12
(exactly the same directory hierarchy as you already have on the CLS).assignment12
directory.As shown below, use wget
to get a copy of the Fetch program from this URL into a file named do.sh
: http://teaching.idallen.com/cst8207/13w/notes/data/assignment12wget.sh
Fedora$ wget -O do.sh http://teaching.idallen.com/cst8207/13w/notes/data/assignment12wget.sh
`do.sh' saved [545/545] # size may differ slightly
Make sure you have a file named do.sh
in your directory. You only need to download this once per assignment.
As shown below, use sudo
and sh
to run the do.sh
script you just downloaded to Fedora 12 with the USER
environment variable set to your own CLS account userid (as stored in the USER
variable).
Fedora$ sudo USER=$USER sh do.sh
This Fetch program will connect from Fedora 12 to the CLS using your account name. It will copy files from Fedora 12 to your assignment12
directory on the CLS. It will then run the checking program on the CLS to check your work. You will need to answer one question about your IP address, and then wait and type in your CLS password.
It will look something like this:
Fedora$ whoami
abcd0001
Fedora$ hostname
abcd0001
Fedora$ pwd
/home/abcd0001/CST8207-13W/Assignments/assignment12
Fedora$ wget -O do.sh http://teaching.idallen.com/cst8207/13w/notes/data/assignment12wget.sh
`do.sh' saved [545/545] # size may differ slightly
Fedora$ sudo USER=$USER sh do.sh
---------------------------------------------------------------------------
abcd0001: FETCH version 1. Connecting to CLS as USER='abcd0001' using ssh
---------------------------------------------------------------------------
abcd0001: Use local Algonquin IP cst8207-alg.idallen.ca [y/N]? n
abcd0001: Please wait; using ssh to connect to user 'abcd0001' on cst8207.idallen.ca ...
*** COURSE LINUX SERVER ***
abcd0001@cst8207.idallen.ca's password: # enter your CLS password
---------------------------------------------------------------------------
idallen-ubuntu assignment12fetch_server.sh version 0 run by abcd0001.
Please wait; collecting info from abcd0001 Virtual Machine
---------------------------------------------------------------------------
VM files collected into CST8207-13W/Assignments/assignment12/abcd0001.tar.bz on CLS.
Now running check program for abcd0001 on CLS:
----------------------------------------------------------------------------
idallen-ubuntu check: CST8207-13W/Assignments/assignment12 check program version 00
*** Checking account for abcd0001 on idallen-ubuntu ***
[... checking program output appears here ...]
assignment12
on the CLS..bashrc
file or world-writable files on the CLS). These errors are on the CLS, not on your Fedora 12 machine.When you are done with your assignment, you need to run the checking program one last time on the CLS and submit the output file, as follows:
Do all this on the Course Linux Server:
There is a Checking Program named assignment12check
in the Source Directory on the CLS. Create a Symbolic Link to this program named check
under your new assignment12
directory so that you can easily run the program to check your work and assign your work a mark. Note: You can create a symbolic link to this executable program but you do not have permission to read or copy the program file.
Execute the above “check” program on the CLS using its symbolic link. (Review the Search Path notes if you forget how to run a program by pathname from the command line.) This program will check your work, assign you a mark, and display the output on your screen. (You may want to paginate the long output so you can read all of it.)
You may run the “check” program as many times as you wish, to correct mistakes and get the best mark. Some tasks sections require you to finish the whole section before running the checking program at the end; you may not always be able to run the checking program successfully after every single task step.
When you are done with checking this assignment, and you like what you see on your screen, redirect the output of the Checking Program into the text file assignment12.txt
under your assignment12
directory on the CLS. Use the exact name assignment12.txt
in your assignment12
directory. You only get one chance to get the name correct. Case (upper/lower case letters) matters. Be absolutely accurate, as if your marks depended on it. Do not edit the file.
Transfer the above assignment12.txt
file from the CLS to your local computer and verify its contents. Do not edit this file! No empty files, please! Edited or damaged files will not be marked. You may want to refer to your File Transfer notes.
Submit the assignment12.txt
file under the correct Assignment area on Blackboard (with the exact name) before the due date. Upload the file via the assignment12 “Upload Assignment” facility in Blackboard: click on the underlined assignment12 link in Blackboard. Use “Attach File” and “Submit” to upload your plain text file.
No word-processor documents. Do not send email. Use only “Attach File”. Do not enter any text into the Submission or Comments boxes on Blackboard; I do not read them. Use only the “Attach File” section followed by the Submit button. (If you want to send me comments about your assignment, use email.)
Your instructor may also mark the assignment12
directory in your CLS account after the due date. Leave everything there on the CLS. Do not delete any assignment work from the CLS until after the term is over!
Use the exact file name given above. Upload only one single file of plain text, not HTML, not MSWord. No fonts, no word-processing. Plain text only.
Did I mention that the format is plain text (suitable for VIM/Nano/Pico/Gedit or Notepad)?
NO EMAIL, WORD PROCESSOR, PDF, RTF, or HTML DOCUMENTS ACCEPTED.
No marks are awarded for submitting under the wrong assignment number or for using the wrong file name. Use the exact name given above.
WARNING: Some inattentive students don’t read all these words. Don’t make that mistake! Be exact.
READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!