Question: Adding Users - Part 1 Given a data file new_users.txt with the same record format as /etc/passwd shown below: username:password:uid:gid:GECOS:homedir:shell Write a shell script that

Adding Users - Part 1

Given a data file new_users.txt with the same record format as /etc/passwd shown below: username:password:uid:gid:GECOS:homedir:shell Write a shell script that will generate the command necessary to add each user. This command must include each of the following:

1. Username

2. GECOS

3. Home directory

4. Create home directory and load skeleton files from a directory /home/csadmin/SKEL

5. Specify shell Your program should DISPLAY the command generated for each record on the screen. DO NOT attempt to actually execute the command to add the users.

Adding Users - Part 2

Write a script that will take input from cs_roster.txt file made available by the IT department and generate the new_users.txt file that is used as input for the script in Adding Users - Part 1.

Prefix Number Section|username|Full Name|Student_ID|major1|major2 Please note:

1. No accounts should be created for students enrolled in CMPSC 1513

2. No accounts should be created for students enrolled in any course with CPSMA as a prefix except CPSMA 2923 which is our Data Structures class

3. The major code for Computer Science is 0510.

4. Any student that has declared Computer Science as his/her first or second major should have their home directory in /home/STUDENTS/majors

5. Any student that does not have Computer Science as a major should have home directory in /home/STUDENTS/nonmajors

Use a local copy of cs_roster.txt file for input directly. This will enable you to alter the file any way you wish for testing and so can I...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!