Question: I need this done in linxu shell script, thank you! Submission Demonstrate your script execution on your laptop to the professor during your scheduled lab
I need this done in linxu shell script, thank you!
Submission
Demonstrate your script execution on your laptop to the professor during your scheduled lab periods and submit your completed lab on BlackBoard before the due date.
Procedure
You will create a script file for the purpose of user and group management in Linux.
You will create a script file called myscript using vim.
The first line of each of your script file should force the use of the bash shell.
On the top of the script file, there should be a section of comments that contains the Assignment number, your name, student number, lab section number, name of the script file, the date, and a description of what the script file does
Your script file should be properly commented.
It should contain a menu that gives the user a choice of five items labeled A - F and
Q, and a prompt asking for what the users choice is.
A)Create a user account
Delete a user account
Change supplementary group for a user account
Change initial group for a user account
Change default login shell for a user account
Change account expiration date for a user account
Q) Quit
This script file must loop using a while loop. When you run it, you can choose one menu item. A message should be displayed if an invalid option is chosen.
The menu choice should be decoded using an if-elif-else structure.
The if structure should accept upper or lower case letters. Use || operator to allow upper or lower case characters.
If A or a is chosen, the script should prompt you to enter the following information:
Username
Users home directory
Default login shell
Create the user account based on the information given above
If B or b is chosen, it should prompt you for username of the account to be deleted, and delete the user account as well as the users home directory
If C or c is chosen, it should prompt you for username and group name that is added as a supplementary group for the user account
If D or d is chosen, it should prompt you for username and group name that is used as the initial group for the user account, and change the initial group for the user account.
If E or e is chosen, it should prompt you for username and shell name, and change the default shell for the user account.
If F or f is chosen, it should prompt you for username and expiration date, and change the expiration date for the user account.
If Q or q is chosen, the script should end.
It should sleep for 3 seconds after each menu item is selected before the loop causes the menu to be redisplayed
Below is a sample of a while loop:

choice-n #initializet dummy value while [ $choice '- "0" ] && [ $choice '- "q" do clear echo -e "Choice: c" read choice echo "You Entered Schoice." sleep 3 done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
