Design and implement the disableusersh script generate


Design and implement the disableuser.sh script.

Required script functionality:

disableuser.sh -v : prints the script version number and exits
disableuser.sh -h : prints help content and exits
disableuser.sh : Disables (locks), but does not remove the specified user account => user cannot use disabled account for login
disableuser.sh -m <'message'> : Does not disable login (by the operating system), but changes the user's login shell to a script that just writes the quoted message to standard output and then exits

Example results:

o whoami -> student1

o disableuser.sh -m user1 'You have been terminated'

o su user1 -> 'You have been terminated'

o whoami -> student1

Your disableuser.sh script will have to:

o Generate the special login script that incorporates the quoted message

o Configure user account to use the special login script

 

Solution Preview :

Prepared by a verified Expert
Operating System: Design and implement the disableusersh script generate
Reference No:- TGS0666745

Now Priced at $30 (50% Discount)

Recommended (93%)

Rated (4.5/5)