Question: IA 2 1 2 - Project ( 2 0 pts total ) Please, submit the following items to Canvas. Screenshots for executing questions ( #
IA Project pts total
Please, submit the following items to Canvas.
Screenshots for executing questions # points
Upload script code question # as a text file with comments explain what the
commands are doing points
Screenshots for running script successfully with several cases points
a Refer to the example towards the bottom of the instructions
Create three users with different passwords using root user. points
Add two users of them to the wheel group.
A Please, explain the difference between the users on the wheel group and the
one which is not in the wheel group point
Add the remaining user to the group TypicalUsers.
A If the group does not exist, you should create it point
Create a folder and name it as Privilege folder. point
Give the users on the wheel group the full permissions rights read write and
execute on Privilege folder. point
For the user part of TypicalUsers assign read permissions on the Privilege folder. I
point
Write a shell script which is going to do the following:
A Keep asking the user to enter the user name through the terminal until "root" user
name entered then the script will be terminated points
Hint: use while
B The shell script will pass the value of user name to a function written inside
the same script which is going to do the following:
Add the user to the system point
Check if the user addition failed and print a message "Useradd
failed" Hint use $ ne as conditionne means not equal
Then exit the function with value of using return
Note return will exit from the function while exit will quit the shill script
Change the user password using passwd command point
Check if the password changed is failed and print a message
"Setting password failed"
Hint use $ne as condition point
Then exit the function with value of using return
Finally, check the value returned by the function using $
If the value is print "Something went wrong with useradd"
If the value is print "Something went wrong with passwd"
Otherwise print "added to the system." point
Please, check the following output example of running the script:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
