Ubuntu shell script - linux, Operating System

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
Posted Date: 3/20/2013 1:34:58 AM | Location : United States







Related Discussions:- Ubuntu shell script - linux, Assignment Help, Ask Question on Ubuntu shell script - linux, Get Answer, Expert's Help, Ubuntu shell script - linux Discussions

Write discussion on Ubuntu shell script - linux
Your posts are moderated
Related Questions
How can a user program disturb the normal operation of the system? a) Issuing illegal I/O operation. b) By accessing memory locations within the OS itself. c) Refusing to

What are the different accessing methods of a file? The different types of accessing a file are: Sequential access: Information in the file is accessed sequentially

EXAMPLE FOR SEGMENTATION Consider an instance as given in the table and we have five segments numbered from 0 through 4 the segment is stock in the physical memory as shown. Th

List two types of system directories A) Device directory:- Describing physical properties of files. B) File directory :- Giving logical properties of the files.

List the Coffman's conditions that lead to a deadlock. Mutual Exclusion : Only one process might be use a critical resource at a time. Hold & Wait: A process may be alloc

State critical section problem? Discuss three solutions to solve the critical section problem. C-S Problem:- n processes all competing to use some shared data Every

Swapping : Whole process is moved from the swap machine to the main memory for execution. Process size must be equal or less than to the used main memory. It is easier to exe

Examining the write/cycles as shown below We can see that the bus is designed for asynchronous read/write cycles. The operation of the write cycle is simple in that the add

What are the main differences between operating systems for mainframe computers and personal computers? The design goals of operating systems for those machines are quite diffe

What are the three main activities of an operating system in regard to memory management? Keep track of which parts of memory are now being used and by whom. Decide which pr