Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: Automated Account Management (3 marks) You have been asked by your boss to prepare two shell scripts which manage user information: You are

Part 1: Automated Account Management (3 marks)

You have been asked by your boss to prepare two shell scripts which manage user information:

You are to prepare a simple shell script which reads a text file called users.txt. The file is in the form

dfs /home/dfs Daniel Saffioti

and creates these users on the system without any interactive input. To do this you will need to use the adduser(1) and passwd(1) commands. You will need to randomly produce the password and report this to the administrator.

You can assume the fields being username, home directory and GCOS string are separated by a single white space.

You can assume all users are in the same group. The program should output the username and generated password once created.

Management of users is important particularly their removal. Write a shell

(.sh) script that takes a single argument being a username, looks for the account in /etc/passwd, deletes the accounts, and archives their home directory into a tar.gz file. You will receive more marks if you avoid using the standard user management tools.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago