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
The optimal replacement policy, called OPT, is to evict the page which will be accessed farthest into the future. Since we can't predict the future precisely, we can't implement OP

Demand paging gives that pages could only be brought into memory if the running process acts them. This is usually referred to as lazy evaluation as only those pages operated by

Question: (a) Answer the following questions based on the code snippet below. 1. int main (int argc, char *argv[]) 2. { 3. 4. pid_t processId; 5. 6. processId =

What are the differences between process and thread? The fundamental difference between a process and a thread is that a process has an entire copy of the program to itself and

Explain the various page replacement strategies. Page replacement-basic scheme with diagram Optimal page replacement LRU page replacement FIFO page replacement LRU

Write a note on semaphores A semaphore is a tool meant for synchronizing multiple processes trying to access a shared variable. That is a semaphore is used to deal with the cri

What is a buddy system? We are dividing the memory as powers of two therefore the division will be 2, 4, 8, 16, 32, 64, 128, 256...i.e. in powers of 2 as well as we are selecti

Explain the Request or Response interface The Request/Response interface is ideal for a message based client-server interaction. By modeling components to interact via a reque

Problem 1: (a) What are the likely benefits which an organisation may derive from the planning process? (b) Explain the main reasons why an organisation may fail to plan.