The newusers command
The newusers command provides an easy way to create a group of new user accounts. It reads a text file that contains one line for each new user, listing the user's name and password.
Here's the syntax of the newusers command:
newusers [filename]
If you omit the filename, newusers accepts input from the console. Suppose that you have a file named /root/island.users that contains these lines:
marlin ml9jiedr
skipper 1hiecr8u
professor dr0uxiaf
maryann choe7rlu
ginger jiuqled5
mrhowell j1emoaf1
lovie zo2priak
You can then create these seven stranded user accounts by issuing this command:
$ newusers /root/island.users
WarningBecause the newusers file contains unencrypted passwords, you shouldn't leave it lying around. Require these new users to change their passwords immediately and delete the file you used to create the users.
In this tutorial:
- Linux Commands
- Command Shell Basics
- Editing commands
- Wildcards
- Redirection and piping
- Environment variables
- Shell scripts
- Directory and File Handling Commands
- The cd command
- The mkdir command
- The rmdir command
- The ls command
- The cp command
- The rm command
- The mv command
- The touch command
- The cat command
- Commands for Working with Packages and Services
- The rpm command
- Commands for Administering Users
- The usermod command
- The chage command
- The passwd command
- The newusers command
- The groupadd command
- The groupdel command
- Commands for Managing Ownership and Permissions
- The chgrp command
- The chmod command
- Networking Commands
- The ipconfig command
- The netstat command
- The ping command
- The route command
- The traceroute command