Project #10: Authentication

Submit: Turn in your entire xinu-hw10 directory source files using the turnin command on morbius.mscsnet.mu.edu or one of the other Systems Lab machines. Please run "make clean" in the compile/ subdirectory just before submission to reduce unnecessary space consumption.

Work should be completed in pairs. Be certain to include both names in the comment block at the top of all key source code files, with a TA-BOT:MAILTO comment line including any addresses that should automatically receive results. It would be courteous to confirm with your partner when submitting the assignment.

Preparation

First, make a fresh copy of your work thus far.
      cp -R xinu-hw9 xinu-hw10

Then, untar the new project files on top of it:
      tar xvzf ~brylow/os/Projects/xinu-hw10.tgz

Be certain to make clean before compiling for the first time. It is not required to have completed last week's assignment to work on this project -- you just won't be able to delete password files within the Xinu Shell. You can still start with a blank disk by using a fresh disk image file with the xinu-disk tool, or by deleting your existing disk image file within the Linux shell.

An Authentication Layer

The project tarball includes an implementation for a simple hash-based password storage scheme, and a new set of shell commands for making and switching users, changing passwords, logging in and logging out: chpass, login, logout, makeuser, switchuser, and whoami. This system uses a file called "passwd" in last week's filesystem to store a small table of users with their password hash and salt values.

While your coding and testing will be limited to just three files, you are expected to be conversant with the details in all of the new code provided this week. You will be writing

  1. shell/xsh_chpass.c An implementation of the chpass command that allows users to change their passwords, or the superusr to change the passwords of others.
  2. shell/xsh_makeuser.c An implementation of the makeuser command that allows the superusr to make new user accounts on the system. Note that code in shell/xsh_login.c already makes the superusr account, so there is ample prior work for you to learn from.
  3. file/passwdFileRead.c A utility file that write the global user table to a disk file called, "passwd". This will allow user accounts and passwords to persist across runs of your operating system. The mirror image file/passwdFileWrite.c already exists for your reference, as does the call to passwdFileRead() in sbOpen() that attempts to read in an existing passwd file everytime your filesystem superblock is opened for the first time.
You do NOT need to make any changes to any of the other files in the system this week.


[back]

[Revised 2024 Apr 26 14:08 DWB]