Thursday, November 4, 2021

Using chpasswd to change account passwords on Linux

The chpasswd command allows admins to change account passwords by piping username and password combinations to it.

This can be done one-account-at-a-time or by putting all of the accounts to be modified in a file and piping the file to the command.

How to use chpasswd

Using the chpasswd command requires root privilege. You can switch to the root account and run a command like this:

# echo nemo:imafish | chpasswd

Better yet, you can use sudo with a command like this:

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment