Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!