& Amp; 65279; & amp; 65279; role: change user password & amp; 26684; formula: passwd [options] [LOGIN] description: normal users can only change their own passwords; A super user can change the password of any account or the validity period of the password. a super user can
Purpose: modify the user password.
Format: passwd [options] [LOGIN]
Description:
Normal users can only change their own passwords. super users can change the passwords of any account or change the validity period of the passwords;
Super users do not need to enter the password of the user to be modified;
Option:
-A, -- all
Used with-S to display the status of all users
-D, -- delete
Delete user password
-E, -- expire
Immediately invalidates the user password and forces the user to change the password upon next login
-H, -- help
Show Help information and exit
-I, -- inactive INACTIVE
After the account becomes INACTIVE, the user cannot use the account to log on again.
-N, -- mindays MIN_DAYS
The password must be modified at least within MIN_DAYS. if MIN_DAYS is 0, the password can be modified at any time.
-S, -- status
The account status information is displayed in seven fields: logon name, L (P or NP), Last modification time, minimum age, maximum age, warning period, and inactive period. The units of these ages are all days.
-W, -- warndays WARN_DAYS
WARN_DAYS days warning before password failure
-X, -- maxdays MAX_DAYS
Set the maximum password validity period
File:
/Etc/passwd
User account information
/Etc/shadow
Encrypt user account information
/Etc/pam. d/passwd
PAM configuration of passwd
Exit value:
0: Successful
1: Access Denied
2: invalid option combination
3: Unknown failure, nothing done
4: Unknown failure, passwd file loss
5: The passwd file is occupied. try again
6: The option has invalid parameters.
Example:
View all user information
Sudo -- status -- all
Change current user password
Passwd