The content originates from the people's post and Telecommunications press "Linux command Application big dictionary"
tell 729 commands, 1935 examples
Learn about the Linux system's reference books, desk book, encountered the command or command not understand the options can be found
Strive to publish content every day
passwd command
use the passwd command to set or modify the user's password, ordinary users and super-privileged users can run passwd, ordinary users can only change their user password,root Users can set or modify the password for any user. If the passwd command is not followed by any option or user name, the current user's password is modified.
Command syntax:
passwd [ options ] [ user name ]
The meanings of the options in the command are as shown in the table.
table passwd command options meaning
Options |
Meaning |
-D |
Delete user password, can only be operated as root user |
-L |
Lock the password of the user account |
-U |
Unlock password for user account |
-X < days > |
Maximum effective time limit for passwords |
-N < days > |
Minimum effective time limit for passwords |
-W < days > |
Start reminding users how many days before the password expires |
-I < days > |
How many days after the password expires the account will be disabled |
-S |
Querying the user's password status |
-F |
Enforcement action |
Example: Set the user 's it password.
[Email protected] ~]# passwd it
change The password for the user's it .
the new Password: // Enter the user 's it password here
re-enter the new Password: // re-enter the user 's it password here
passwd: All the authentication tokens have been successfully updated.
Example: Lock the user 's it password.
[Email protected] ~]# Passwd-l it
lock The user 's it password .
passwd: Successful Operation
users cannot log on to the system after it has been locked, but can use the su command to switch from other users to the user it
Example: View the user 's it password status.
[Email protected] ~]# Passwd-s it
It LK 2013-08-18 0 99999 7-1 ( password has been locked.) )
View user password status, show user it 's password is locked
Example: Unlocking the user 's it password.
[Email protected] ~]# Passwd-u it
unlock the user 's it password .
passwd: Successful Operation
User it has been successfully unlocked, reset with password to unlock user
Example: Delete the user 's it password.
[Email protected] ~]# passwd-d it
clears the user's password for it.
passwd: Successful Operation
passwd Command--linux command application of large dictionary 729 commands interpretation