帐户到期(非活动)和帐户被锁定之间有什么区别?

帐户到期(非活动)和帐户被锁定之间有什么区别?

在此输入图像描述

来源:https://linuxopsys.com/topics/chage-command-in-linux

在此输入图像描述

该图像取自《Linux with Operating System Concepts》一书。

我在这里不明白的是,什么是-E选项?

是密码过期或帐户变为非活动状态的日期吗?

帐户到期和帐户变得不活跃之间有什么区别?

从手册页:

-E, --expiredate EXPIRE_DATE
           Set the date or number of days since January 1, 1970 on which the user's account
           will no longer be accessible. The date may also be expressed in the format
           YYYY-MM-DD (or the format more commonly used in your area). A user whose account is
           locked must contact the system administrator before being able to use the system
           again.


-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.

-E 和 -I 选项之间存在混淆。

答案1

也许这种混乱是由于可能过期的两个不同的东西造成的:帐户及其密码。

考虑以下事件顺序:

  1. 该账户是在时间T 0创建的。
  2. 使用该选项将其设置为在时间 T e-E到期。
  3. 帐户上设置了密码。
  4. 使用该选项将密码设置为在时间 T p-M到期。
  5. 使用该选项将帐户设置为在密码过期后的某个时间 dT 锁定-I

然后:

  • T e与 T p和 dT无关且独立。

  • 帐户可以在 T e(因帐户过期而被锁定)和 T m = T p + dT(因密码过期后不活动而被锁定)中的较早者被锁定。

现在,不活跃的可以意味着多种意思。这可能意味着没有活动帐户上,因此没有人登录过该帐户。这可能意味着该帐户不再可用,因此没有人登录其中。使用哪种含义取决于上下文。

  • 在 T p和 T m之间的时间内,该帐户处于非活动状态 - 没有人登录该帐户。
  • 在 T m或 T e之后,该帐户也处于非活动状态,但因为没有人可以登录它。

相关内容