来源: 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 选项之间存在混淆。
也许这种混乱是由于可能过期的两个不同的东西造成的:帐户及其密码。
考虑以下事件顺序:
-E
到期。-M
到期。-I
。然后:
T e与 T p和 dT无关且独立。
帐户可以在 T e(因帐户过期而被锁定)和 T m = T p + dT(因密码过期后不活动而被锁定)中的较早者被锁定。
现在,不活跃可能意味着多种含义。这可能意味着该帐户没有任何活动,因此没有人登录该帐户。这可能意味着该帐户不再可用,因此没有人可以登录该帐户。使用哪种含义取决于上下文。