Assignment title: Information


Page 1 of 4 COMP.6103 Network Operating Systems Management Semester 2, 2016 Assignment 1 Faculty of Business IT and Creative Arts Due Time: 4.00 p.m. Due Date: Monday, 22 August, 2016 Course Weighting: 20% Marks: 100 Instructions: This is an individual assignment. Please note that each student will have an oral examination during which he/she will have to explain parts of the script selected by your tutor. Assignment Hand-in: You need to submit a paper version of your assignment to the reception of the Faculty of Business, IT, and Creative Arts situated in I block on or before the due date and time. An electronic version of your assignment also needs to be submitted either by uploading it to the e-campus on or before the due date and time or via email at [email protected]. Assignments which are submitted up to 24 hours late will be marked, but cannot achieve more than a C- grade (pass only). Assignments handed in more than 24 hours late will not be marked unless Special Assessment Circumstances apply. So it would be better to hand in an incomplete assignment on time to qualify for some marks. Learning outcome assessed: 4 & 5Task: Write a shell script that can be used to:  add a group of users from an input file (plain text file) to your Fedora Linux System,  generate an appropriate report and  provide help when users enter wrong and/or incomplete commands. You need to specify the shell script file name and input file name. Decide on what switches your program will provide, and explain the function of each of these switches. Describe the syntax of the command needed to execute this shell script, using standard UNIX/LINUX notation. Detailed requirements 1. The script can only be executed by the root user, administrator or users with administrative rights. 2. If the root user starts the program as specified, it should read the input file and check the new user's information record one by one. If the new user information is valid, it should create the account for the user on the Fedora Linux System and write the account information to a report file. The report should have the following format: account_name:user_id:group_name:group_id:created_date:user_fullname 3. If the new user information is not valid, it will not create the account for the user. The error should be written to an error report file. You need to specify the file format for the error report file. 4. If the root user executes the script incorrectly, e.g. without the necessary parameters or with incorrect parameters, it should provide an appropriate help message to the user. For example, it could show the correct usage of the command. 5. If the root user executes the script with the –h switch, it should give detailed information about the script and the file structure of the input file on the screen. 6. The input file should have the following structure:  Each line is a user record.  The record has four fields separated by colons ':', as follows: username:password:groupname:fullname Note: You can define each field feature. For example, only the fullname field can contain blank spaces. The password field can be 6 to 8 characters long. If the group name does not exist, the program should create a default group automatically. The script should contain necessary comments to clearly describe the flow of control and the behaviour of the program. It must be presented in a neat and structured format.Deliverables: You must submit all of the following: 1. electronic documents:  The script file, myaddusers. This is a Linux executable file to run on Fedora Linux system.  Sample test input file with at least five records, userlist.txt. This is also a Linux file. Carefully choose the records, so that you can test the major functions of your script.  External document, either in MS Word format or Open office format. Use the name: surname_script.doc, for example smith_script.doc. This file should contain all the descriptions of your script required by this assignment and contents of myaddusers and userlist.txt files as appendices.  When you submit, pack/zip the above three files in one compressed file and upload it to the e-campus or send via email to [email protected]. 2. Printed document:  This is the printed version of file 'surname_script.doc'. This document describes the program functions, installation procedure, usage, input file format, sample input file with at least five records, limitations and known bugs and source code. Ensure that you use a cover sheet for the hard copy when submitting at the BITA faculty reception.Marking Schedule (based on the printed document) NOTE: If the work is not student's own work, Zero marks may be awarded, irrespective of what is contained in the submissions. It is therefore important that you are able to explain the code and discuss the submitted material with the teacher in an oral exam. Topic Max. Marks Marks allocated Not attempted Satisfactory Good, some sign of best practice Excellent, best practice used Description of the format of the input files 5 0 2.5 4 5 Sample entries to test the users information 10 0 5 8 10 Limitations and known bugs 5 0 2.5 4 5 Documentation of the script 15 0 7.5 12 15 Script functions and quality (meeting detailed requirement no.1) 10 0 5 8 10 Script functions and quality (meeting detailed requirement no.2) 10 0 5 8 10 Script functions and quality (meeting detailed requirement no.3) 10 0 5 8 10 Script functions and quality (meeting detailed requirement no.4) 10 0 5 8 10 Script functions and quality (meeting detailed requirement no.5) 10 0 5 8 10 Script functions and quality (meeting detailed requirement no.6) 10 0 5 8 10 Ease of installation and use by administrator 5 0 2.5 4 5 Total 100 100