首页 > 代码库 > Linux用户密码期限修改
Linux用户密码期限修改
今天有开发报故,sftp无法登录。检查服务都是正常的,之前3月份也出现过此问题,当时忙没有注意,现在看每3个月出现问题。这才想到是密码过期导致的。
先重置用户密码,发现过期日志为Oct 08, 2017,有效期为90天。
[root@01 ~]# chage -l testuserLast password change : Jul 10, 2017Password expires : Oct 08, 2017Password inactive : neverAccount expires : neverMinimum number of days between password change : 0Maximum number of days between password change : 90Number of days of warning before password expires : 10
修改密码为永不过期,修改后见红色标注
[root@01 ~]# chage -M 99999 testuser[root@01 ~]# chage -l testuserLast password change : Jul 10, 2017Password expires : neverPassword inactive : neverAccount expires : Oct 16, 2243Minimum number of days between password change : 0Maximum number of days between password change : 99999Number of days of warning before password expires : 10
参考
Linux账户密码过期安全策略设置 - 潇湘隐者 - 博客园
http://www.cnblogs.com/kerrycode/p/5600525.html
Linux用户密码期限修改
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。