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 11, “Command-Line Master Class,” combined with information on writing scripts from Chapter 13, “Automatig Tasks and Shell Scripting.”
However, Ubuntu also provides the
newusers command to add ...