发现密码期限为90天:

[root@01 ~]# chage -l testuser
Last password change     : Jul 10, 2017
Password expires     : Oct 08, 2017
Password inactive     : never
Account expires     : never
Minimum number of days between password change     : 0
Maximum number of days between password change     : 90
Number of days of warning before password expires    : 10

修改密码为永不过期

[root@01 ~]# chage -M 99999 testuser
[root@01 ~]# chage -l testuser
Last password change                    : Jul 10, 2017
Password expires                    : never
Password inactive                    : never
Account expires                        : Oct 16, 2243
Minimum number of days between password change        : 0
Maximum number of days between password change        : 99999
Number of days of warning before password expires    : 10

确保以后账户不会有此限制:

#vim /etc/login.defs
PASS_MAX_DAYS 9999999 #改成999999
PASS_MIN_DAYS    0
PASS_MIN_LEN    6
PASS_WARN_AGE    10

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code