Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bash: Create a script for a Linux computer in Bash that will create new users that can be read from any text file and file

Bash:

Create a script for a Linux computer in Bash that will create new users that can be read from any text file and file is delimited with a pipe (|). A GUI is too slow so you must enter each user individually.

The script then will take input from a given file of any number of users and create the user account by giving the following information in the file: The User name field The password User Home Directory (check out the -m option) Shell

Then you need to figure out the arguments for the command: useradd and use the defaults for the UID and GID

Then in a loop read the users and using the command useradd keep adding a user until the file ends.

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_2

Step: 3

blur-text-image_3

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 Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

What does your teacher want you to learn by doing this lesson?

Answered: 1 week ago