admin管理员组文章数量:1530069
项目场景:
昨天使用了usermod -e 2021-04-13 wherein 设置了用户wherein 的过期时间
问题描述:
今天直接登录ssh wherein@118.126.94.223就登录不上了
原因分析:
用法:chage [选项] 登录
选项:
-d, --lastday 最近日期 将最近一次密码设置时间设为“最近日期”
-E, --expiredate 过期日期 将帐户过期时间设为“过期日期”
-h, --help 显示此帮助信息并推出
-I, --inactive INACITVE 过期 INACTIVE 天数后,设定密码为失效状态
-l, --list 显示帐户年龄信息
-m, --mindays 最小天数 将两次改变密码之间相距的最小天数设为“最小天数”
-M, --maxdays 最大天数 将两次改变密码之间相距的最大天数设为“最大天数”
-R, --root CHROOT_DIR chroot 到的目录
-W, --warndays 警告天数 将过期警告天数设为“警告天数”
# 更改用户密码过期信息
[root@VM_110_26_centos ~]# chage -l wherein
Last password change : Nov 07, 2019 # 最近一次修改密码的时间
Password expires : never # 密码过期时间
Password inactive : never # 密码失效时间
Account expires : Apr 13, 2021 # 账户过期时间
Minimum number of days between password change : 0 # 两次改变密码之间相距最小天数
Maximum number of days between password change : 99999 # 两次密码改变密码相距最大天数
Number of days of warning before password expires : 7 # 密码过期前开始警告的天数
解决方案:
直接设置长久的过期时间, 如n年后或n天后
[root@VM_110_26_centos ~]# usermod -e 2021-08-08 wherein
[root@VM_110_26_centos ~]# chage -l wherein
Last password change : Nov 07, 2019
Password expires : never
Password inactive : never
Account expires : Aug 08, 2021
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
本文标签: AccountusermodLinuxExpiredadministrator
版权声明:本文标题:[Linux] usermod: Your account has expired; please contact your system administrator 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1726641045a1079647.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论