|
Linux Command: chpasswd
Bulk edit user password
working principle:
Enter read user names and passwords from the standard system, and use this information to update the system's existing user password
grammar:
1: # echo Username: Password | chpasswd
2: # chpasswd
parameter:
-e: If the -e option, the password can only be transmitted in encrypted form
If the -e option is not used, the password will be transmitted in plain text form
Precautions
1: The user name must be on the system existing user
2: The average user does not have permission to use this command
3: If the input file is encrypted by a non-transfer, please file the proper encryption.
4: instruction files can not be empty lines
Examples
1, directly modify the user's password is helloboy doiido
# Echo doiido: helloboy | chpasswd
2, using the username and password which doiido.txt bulk modify the user's password
2.1: Firstly instruction file doiido.txt (format [username: passwd])
# Vi doiido.txt
doiido1: helloboy
doiido2: hellogirl
2.2: transferring content doiido.txt to chpasswd instruction to modify the user's password
# Chpasswd
3, so that ordinary users to use chpasswd
The default is no ordinary user chpasswd permission, but you can modify the command to modify file permissions
# Chmod 4755 / usr / sbin / chpasswd
So that ordinary users can use to change the password chpasswd |
|
|
|