A shell script has been defined on the tartarus machines,
which will define a subdirectory named minix,
and populate it with the material for this assignment.
To run the script, simply type ~cg411/minixsetup
What you will see will be symbolic links to the cg411 accounts directories, to optimize disk usage. There is no need for multiple copies of the 16 Megabyte disk images.
ghostview:
ghostview ~cg411/doc/smx_ps
| Describes the overall system.
Pages 1-2 and 5-6 would be most useful. |
ghostview ~cg411/doc/smx_lab_ps
| Provides a simple tutorial for running this system. |
This assignment will NOT involve making any changes to the
Minix operating system code, so most of the documentation is
irrelevant. Therefore, printing the complete documentation
would only be a waste of time, paper, and your print quota.
If you must have it on paper, ghostview
will let you select which pages you want to print.
One possibly confusing difference between the Minix shell and our Solaris is how to logout. Minix uses the classical Control-D to logout, not the command 'logout'. (The curious can see what Control-D does on our system.)
Log in to your copy of Minix as described in the lab document. First log in as root, but to create a new user, do NOT go through the listed steps. Just use the 'adduser' script (for more info, type man adduser in Minix).
Then log in as this new user, and do the following:
You don't have to report on any of this. This is just to get things going, and that last point is for your own thing to think about.
In fact, while you're there, or next time you log in, type "ps -alx", and (using the man page for ps) figure out what it means.
Your job is to find the answers to all the items listed below. It is expected that you will write a program (in Solaris) to assist you -- since examining a binary image file is not a very natural activity for an end user. There is an expectation that everyone has at some point written a program that can read a file.
You can read The Minix disk images using the system library
functions fopen, fseek, and fread. Information
on these functions is available on the man pages. Note that
this last one is designed to allow for a very simple way to
read one or more records from a file, by defining the
size of the record and the number of records desired. Many of
you will find this much easier to use than making sense of
individual bytes.
Unix does provide the octal dump (od) command to help you locate the information in these disk images, but since it does not produce very legible results, it should only be used as a way to get your bearings.
/usr/bin,
one for /usr/man, and one for everything else. Using the data
in the superblock (and nowhere else),
ind the following information for each of the three disks:
man disk, and identify the
following information:
man -s3c ctime)
/usr/man/man7.
For each entry, list the file name, the inode reference
number, and the size of the file (stored in the file's inode).
It is up to you to figure out how a directory entry is represented --
but you may know that all entries occupy 16 bytes.
Of all the entries in /usr/bin, list those (all and only those)
whose inode indicates there is more than one reference.
Why does .. have as many as it does?
Identify all the filenames that use the same inode as bin commands
cp, more and passwd.
Verify that the number of references is correct.
Note that many of the commands that overlap with cp
use the same identical parameter list.
How can the program know which command you requested?
What happened to the inode and file block for the file for which you deleted one reference? What happened to the inode and file block for the file for which you deleted all references?
/etc/shadow, /etc/passwd,
/etc/group and /usr/bin/passwd.
(Some of your necessary data will be in stored in the /etc files.)
Verify your answer by logging in as your user on Minix,
and typing ls -l for all those files.
What does the s mean in the answer given for
/usr/bin/passwd?
Given this protection scheme, what information about users is publically accessible to other users on the system? What additional information would be made available if the protected files were somehow made available? In particular, is the password salt value visible? (You may have to consult some of the Minix man pages to answer that).
No program code will be expected for this assignment. It is expected that many of the questions would be extremely awkward to answer without a program, and the purpose is to better understand the file system itself.
Therefore, only collect together your answers for each of the points listed under The Actual Assignment. Be sure to keep the steps clearly separate and numbered for ease of grading.