我正在研究读取和写入临时密码到期日期的方法(即:如果我们授予用户临时密码并且他们在几天内没有登录并更改临时密码N
,则该帐户将被锁定)。
的文档passwd -i
是
-i, --inactive INACTIVE
This option is used to disable an account after the password has been expired
for a number of days. After a user account has had an expired password for
INACTIVE days, the user may no longer sign on to the account.
的文档chage -I
是
-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.
两者看似做同样的事情,但并不互相引用。是在幕后chage
调用还是它们实际上不同?passwd