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
Get step-by-step solutions from verified subject matter experts
