Adding Users - Part 1 : Given a data file new_users.txt with thesame record format as /etc/passwd shown below:
username:password:uid:gid:GECOS:homedir:shell
Write a shell script that will generate the command necessary toadd 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 adirectory /home/csadmin/SKEL
5. Specify shell Your program should DISPLAY the commandgenerated for each record on the screen. DO NOT attempt to actuallyexecute the command to add the users
Write a script that will take input from cs_roster.txt file madeavailable by the IT department and generate the new_users.txt filethat is used as input for the script in Adding Users - Part 1.
Prefix Number Section|username|FullName|Student_ID|major1|major2
Use a local copy of cs_roster.txt file for input directly.
Adding Users - Part 1 : Given a data file new_users.txt with the same record format as /etc/passwd shown below: username
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Adding Users - Part 1 : Given a data file new_users.txt with the same record format as /etc/passwd shown below: username
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!