CentOS 5.x
我的CenTOS服务器上的用户帐户已无法访问,我不知道为什么.
如果我运行chage -l foo,我会看到:
Minimum: 0 Maximum: 0 Warning: 5 Inactive -1 Last Change: July 17,2012 Password Expires: Never Password Inactive: Never Account Expires: Never
我不确定-1的含义是什么,但据我所知,根据其他设置,系统不应该过期或自动锁定.
假设是这样的话,我还能在哪里解决这个问题?
此外,如果帐户被自动锁定与管理员禁用而不是仅更改密码,症状是否会显示相同?
更新:我检查了/ var / log / secure,我看到了:
Aug 9 07:11:14 foo sshd(pam_unix)[15122]: account foo has expired (Failed to change password) Aug 10 19:12:33 foo sshd(pam_unix)[900]: account foo has expired (Failed to change password)
有趣的是,我也注意到这样的条目:
Aug 13 10:12:00 foo sshd(pam_unix)[23222]: password for user foo will expire in 0 days
这最后一个条目是否意味着密码永不过期?或者它今天会过期?
解决方法
I’m not sure what the -1 means
man chage说:
-I,--inactive INACTIVE Set the number of days of inactivity after a password has expired before the account is locked. The INACTIVE option is the number of days of inactivity. A user whose account is locked must contact the system administrator before being able to use the system again. Passing the number -1 as the INACTIVE will remove an account's inactivity.
更新于8月13日星期一23:02:37 ICT 2012
account foo has expired (Failed to change password)
这意味着foo帐户已过期且处于非活动状态.重置密码.
06002
Does this last entry mean that the password will never expire? Or that
it will expire today?
这就是你在运行chage -l foo时看到Inactive -1的原因. foo帐户将在到期后立即处于非活动状态.
如果将–inactive设置为不同于-1的值,则foo帐户有机会执行“宽限登录”以更改其密码.