Should you really have to wait longer time to change your pass word on Linux?



When you try to change the pass word for a user on Linux, you may encounter "You must wait longer to change your password".  Do you really need to wait longer time to change the pass word? No! You can use chage command to solves this kind of issue :

The following command will list policies for your pass word.

$ chage -l username


Last password change                                    : Feb 08, 2012
Password expires                                        : Apr 08, 2012
Password inactive                                       : Apr 08, 2012
Account expires                                         : never
Minimum number of days between password change          : 1
Maximum number of days between password change          : 60
Number of days of warning before password expires       : 14


In this case, your password policy specifies that the minimum number of days between password changes is 1 day.  You can change this attribute to 0 to make enable pass word change right now. To change the policy for this user, use :

$ chage username

Changing the aging information for username
Enter the new value, or press ENTER for the default

Minimum Password Age [1]: 0
Maximum Password Age [60]:
Last Password Change (YYYY-MM-DD) [2012-02-08]:
Password Expiration Warning [14]:
Password Inactive [0]:
Account Expiration Date (YYYY-MM-DD) [1969-12-31]:

-M option: which can be used to specify the maximum number of days the password is valid. combine 99999, you could disable password expiration.

$ chage -M 99999 user_name

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...