加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-14 02:54:32 所属栏目:Linux 来源:网络整理
导读:CentOS 5.x 我的CenTOS服务器上的用户帐户已无法访问,我不知道为什么. 如果我运行chage -l foo,我会看到: Minimum: 0Maximum: 0 Warning: 5Inactive -1Last Change: July 17,2012Password Expires: NeverPassword Inactive: NeverAccount Expires: Never 我
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帐户有机会执行“宽限登录”以更改其密码.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读