Question: In this assignment, your task is to create a bash script file 'assignment3.sh'. When the user runs assignment3.sh with one argument 'x', your script must:

In this assignment, your task is to create a bash script file 'assignment3.sh'. When the user runs assignment3.sh with one argument 'x', your script must: 1) Create 4 new Linux user accounts, and then associate them to a new group called 'auis_ite306'. The user names of these accounts must be: 'sara', 'john', 'sia' and 'tim'. 2) Create 4 other user accounts, but this time the user names must be auto-generated. 3) Setup a shortcut file 'ref-db' in the desktop directory of each user created in Step 1. These shortcuts must point to /etc/updatedb.conf. 4) Copy all .config files to the home directory of each user created in Step 2. 5) Set the password of each created user to be equal to the argument 'x', that is passed when a user calls assignment3.sh. This password must expire one week's time. 6) Make sure these users can only execute the commands in the directory /bin. 7) Ask the user to enter a welcome message. Then, execute necessary bash commands to print this custom message automatically whenever each user created in Step 1 logins to the system

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 Accounting Questions!