linux – 如何确定谁(或什么)阻止访问centos用户帐户?

前端之家收集整理的这篇文章主要介绍了linux – 如何确定谁(或什么)阻止访问centos用户帐户?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
CentOS 5.x

我的CenTOS服务器上的用户帐户已无法访问,我不知道为什么.

如果我运行chage -l foo,我会看到:

  1. Minimum: 0
  2. Maximum: 0
  3. Warning: 5
  4. Inactive -1
  5. Last Change: July 17,2012
  6. Password Expires: Never
  7. Password Inactive: Never
  8. Account Expires: Never

我不确定-1的含义是什么,但据我所知,根据其他设置,系统不应该过期或自动锁定.

假设是这样的话,我还能在哪里解决这个问题?

此外,如果帐户被自动锁定与管理员禁用而不是仅更改密码,症状是否会显示相同?

更新:我检查了/ var / log / secure,我看到了:

  1. Aug 9 07:11:14 foo sshd(pam_unix)[15122]: account foo has expired (Failed to change password)
  2. Aug 10 19:12:33 foo sshd(pam_unix)[900]: account foo has expired (Failed to change password)

有趣的是,我也注意到这样的条目:

  1. 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说:

  1. -I,--inactive INACTIVE
  2. Set the number of days of inactivity after a password has expired before the account is locked. The
  3. INACTIVE option is the number of days of inactivity. A user whose account is locked must contact the
  4. system administrator before being able to use the system again.
  5.  
  6. Passing the number -1 as the INACTIVE will remove an account's inactivity.

更新于8月13日星期一23:02:37 ICT 2012

  1. 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帐户有机会执行“宽限登录”以更改其密码.

猜你在找的Linux相关文章