The chpasswd command reads a list of user name and password pairs from standard input and uses this information to update a group of existing users. Each line is of the format:
ExamplesThe application is pretty self explanatory but I wanted to put this blurb in here because I had problems running the commands remotely.
- Rather than adding your usernames and passwords to a text file you can pass them to 'chpasswd' like this
echo someusername:somepassword | chpasswd
- The command above ran perfectly fine when executed locally on a server. However when trying to SSH to the server and pass those commands I had problems and had to double quote the command. Pay attention to the quotes
ssh someserver "echo someusername:somepassword | chpasswd"