Open the terminal and type:
sudo newusers /tmp/userlist.txt
In the userlist.txt file, each line should contain user data in the following syntax:
username:password:User ID:Group ID:Comments:Userhome directory:User shell
Since the userlist.txt file contains users' passwords, it should not be stored in a human readable form after you have finished creating the new users. My advice is to store the userlist.txt in a file that is encrypted with a strong password, and then after you have stored the encrypted userlist.txt file securely, to delete the original userlist.txt file from the /tmp
directory so that nobody can read the user passwords as plain text.
For more information about the syntax of the newusers
command type:
man newusers
In the man results for newusers
the GECOS field is also known as the comment field for a user.
Check /etc/passwd
file to see if the new users are created. The easy way to do it is to show a list of only the users' names (There is less unnecessary information to read that way.) using the command:
cut -d: -f1 /etc/passwd