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

#question.explain varios types of system calls..

Question: (a) Explain the similarities and differences between two different threads running in the same process and two independent processes. When would you want to use two t

SSTF stands for Abbreviation of SSTF is Shortest-Seek-time-first scheduling

Consider a scenario of post mailbox, there are two processes named sender S and receiver R. Both processes can communicate with each other by name along with message. You need to I

#include #include #include #include #include int main(void) { int pchan[2], pid, rval, cvar; char buf[20]; if (pipe(pchan) == -1){

What are turnaround time and response time? Turnaround time is the interval among the submission of a job and its completion. Response time is the interval among submission

Define throughput? Throughput in CPU scheduling is the number of processes that are completed per unit time. For long processes, this rate might be one process per hour; for sh

What are over lays? If a large process enters which is huge than the available memory we are able to use overlays. In this we can divide process into pieces .which is recognize

What are a safe state and an unsafe state? Answer:  A state is safe if the system can allocate resources to every process in some order and still avoid a deadlock. A system is