This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Saturday, February 17, 2018

How to change the Linux user's password in single command

Changing the Linux user's password in one command

Chpasswd reads a list of user name and password pairs from standard input and uses this information to update a group of existing users

chpasswd - update passwords in batch mode

Syntax    -  user_name:password

 By default the supplied password must be in clear-text. Also the password age will be updated, if present.

#echo user:password | /usr/sbin/chpasswd

No comments:

Post a Comment