Question: create a bash script using the details provided below 1 . Create a group named after the last 5 digits of your STUDENT ID 2

create a bash script using the details provided below
1. Create a group named after the last 5 digits of your STUDENT ID
2. Ask how many user accounts need to be created (x number of accounts)
3. Ask for the username prefix (i.e., student or user)
4. Create a loop that will run x times, creating user accounts
5. Before the account is created, check and see if the account name already exists, i.e., user03 exists. If the account does exist, then skip to the next available number, i.e., user04 or user05.
6. Add a password (use something unique) that incorporated the count you are at (ie, if 3rd time through the loop then password03
7. Add each account to the ID group
If you want 40 accounts created with prefix: DougisGreat, and DougisGreat01-DougisGreat40 already exists, then it should automatically start at 41

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