今天有开发报故,sftp无法登录。检查服务都是正常的,之前3月份也出现过此问题,当时忙没有注意,现在看每3个月出现问题。这才想到是密码过期导致的。
先重置用户密码,发现过期日志为Oct 08, 2017,有效期为90天。
[[email protected]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
修改密码为永不过期,修改后见红色标注
[[email protected] ~]# chage -M 99999 testuser [[email protected] ~]# 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
参考
Linux账户密码过期安全策略设置 - 潇湘隐者 - 博客园
http://www.cnblogs.com/kerrycode/p/5600525.html
时间: 2024-10-20 17:44:59