On a large system, there might be times when a large number of users and their passwords need some attention. The super user can change passwords in a batch by using the
chpasswd command, which accepts input as a name/password pair per line in the following form:
matthew@seymour:~$ sudo chpasswd username:password
Passwords can be changed en masse by redirecting a list of name and password pairs to the command. An appropriate shell script can be constructed with the information gleaned from Chapter 10, “Command-Line Master Class.”
However, Ubuntu also provides the
newusers command to add users in a batch from a text file. This command also allows a user to be added to a group, and a new directory can be added for ...