Answers:
在允许用户保留当前密码的同时关闭老化
passwd -x -1 username
强制用户在下次登录时更改密码,然后关闭老化
passwd -x 0 username
(希望这可以帮助某人)
https://docs.oracle.com/cd/E19455-01/806-1387/6jam6929e/index.html#a08paswd-89198
您chage
只需要将帐户最小密码设置为一个可笑的长时间(例如9999999999天)的命令。
这是一个很好的方法-http: //www.cyberciti.biz/tips/setting-off-password-aging-expiration.html
这是有关Linux到期密码的chage命令(更改年龄)的完整示例:完全禁用密码到期和帐户:
参数命令修改:
-m 0 : Minimum number of days for the password change.
-M 99999 : Maximum number of days a password change.
-I -1 : We set: "Password inactive" never.
-E -1 : We set: "Expires Account" never.
示例用户名是:sysadmit
[root@linux1~] # chage -m 0 -M 99999 -I -1 -1 -E sysadmit
[root@linux1~] # chage --list sysadmit
Last password change: July 15, 2017
Password expires: never
Password inactive: never
Account expires: never
Minimum number of days Between password change: 0
Maximum number of days Between password change: 99999
Number of days of warning before Expires password 7
摘自:http : //www.sysadmit.com/2017/11/linux-caducidad-contrasena.html
chage
对于此行为具有明确的价值。例如,请参见bindbn的答案。