Detailed
passwd
1. Role
ASSWD command originally modify the account login password, the use of permissions are all users.
2. Format
ASSWD [option] account name
3. Main parameters
-L: Locks the name of the account that is already named, only available to users who have superuser privileges.
-U: Unlock account lockout status, only users who have Superuser privileges can use it.
-X,--maximum=days: Maximum password usage time (days), only used by users with superuser privileges.
-N,--minimum=days: Minimum password usage time (days), only used by users with superuser privileges.
-D: Deletes the user's password, which is available only to users who have superuser privileges.
-S: Check the type of password authentication for the specified user, only users who have Superuser privileges can use it.
4. Application examples
$ passwd
Changing password for user Cao.
changing password for Cao
(current) UNIX Password:
New UNIX Password:
Retype new UNIX Password:
Passwd:all authentication tokens updated successfully.
As you can see from the above, use the passwd command to enter the old password, and then enter the new password two times.