Last Updated : 15 May, 2019
chpasswdcommand is used to change password although
passwdcommand can also do same. But it changes the password of one user at a time so for multiple users
chpasswdis used. Below figure shows the use of
passwdcommand. Using
passwdwe are changing the password of the guest user. Here first you have to enter the password of the currently signed user and then you change the password of any other user. One must have administrator privileges.
chpasswdcommand reads a number of username and password which are separated by colon using standard input or file, and then encrypt as per the options.
Syntax:$chpasswd user1:user1_password user2:user2_password user3:user3_passwordNote:
After completion please press
ctrl+dto exit from the command. As soon as
ctrl + dis pressed password gets changed.
A simple text file can also be used to store username and password and then use them to change the password.
$cat > pass.txt user1:user1_password user2:user2_password user3:user3_password
Then provide this to
chpasswdcommand.
$chpasswd < file_name.txtOptions:
The encryption algorithm can also be applied to the password.
$chpasswd -c SHA512 user1:user1_password user2:user2_password user3:user3_password or $chpasswd --md5 user1:user1_password user2:user2_password user3:user3_passwordNote:
Both are a different type of encryption algorithm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4