The passwd command utility tips in Linux system summary

  
Let's review the basic usage of the passwd command:
Linux passwd command to change the user's password
Syntax
passwd [-k] [-l] [ ,null,null,3],-u [-f]] [-d] [-S] [username]
Required parameters:
-d Delete password
-f Enforce
-k update can only be sent after expiration
-l Stop account usage
-S Display password information
-u Enable account that has been stopped
-x Set password validity period
-g Modify group password
-i Stop user account after expiration
Select parameters:
--help Display help information
--version Display version information
Instance
Change user password
Code is as follows:
# passwd W3cschool //set the password of the w3cschool user
Enter new UNIX password: //enter the new password, the password is not echoed
Retype new UNIX password: //confirm the password
Passwd: password updated successfully
#
Display account password information
Code is as follows:
# passwd -S w3cschool
w3cschool P 05/13/2010 0 99999 7 -1
Delete user The password
code is as follows:
# passwd -d lx138
passwd: password expiry information changed.
Ok, let's take a look at the actual application:
Copyright © Windows knowledge All Rights Reserved