Ubuntu shell script - linux, Operating System

Assignment Help:

Task 1 description: 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:

1. whoami -> student1

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

3. su user1 -> 'You have been terminated'

4. whoami -> student1

Your disableuser.sh script will have to:

1. Generate the special login script that incorporates the quoted message

2. Configure user account to use the special login script

 

Task 2 description: Design and implement the removeuser.sh script.

Required script functionality:

  • Disables (locks) the account username
  • Packs all files (not just those in the user's home directory) belonging to into single compressed archive named
  • Then, removes the user account

Related Discussions:- Ubuntu shell script - linux

Explain the concept of reentrancy, Explain the concept of Reentrancy? I...

Explain the concept of Reentrancy? It is a useful, memory-saving method for multiprogrammed timesharing systems. A Reentrant Procedure is one in which many users can share a si

What is the use of system calls, Q. What is the use of system calls? A...

Q. What is the use of system calls? Answer: System calls permit user-level processes to request services of the operating system.

What is direct access, Normal 0 false false false EN-IN...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Explain single level directory structure, Single level directory: This ...

Single level directory: This is the easiest directory structure. All the files are controlled in the same directory, which is simple to support and understand. Few of the li

Explain the file-system manipulation, Q. Explain the File-system manipulati...

Q. Explain the File-system manipulation? File-system manipulation there is several details in file allocation, creation, deletion and naming that users should not have to perfo

Define file organization, File Organization     * Sequential     * D...

File Organization     * Sequential     * Direct     * Indexed A file still if it is stored on a magnetic disk or CD-ROM disk may perhaps have a sequential file organiz

Process, what common event leads to the creation of a process?

what common event leads to the creation of a process?

Most wans utilize only a partially connected topology, Q. Most WANs utilize...

Q. Most WANs utilize only a partially connected topology. Why is this subsequently Answer: Cost. A completely connected network requires a link between every node in the netw

Explian reference string, What is reference string We evaluate an algor...

What is reference string We evaluate an algorithm by running it on a definite string of memory reference and computing the number of page faults. The string of memory reference

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd