命令:
vim /etc/login.defs
默认设置:
# Password aging controls: # # PASS_MAX_DAYS Maximum number of days a password may be used. # PASS_MIN_DAYS Minimum number of days allowed between password changes. # PASS_MIN_LEN Minimum acceptable password length. # PASS_WARN_AGE Number of days warning given before a password expires. # PASS_MAX_DAYS 99999 PASS_MIN_DAYS 0 PASS_MIN_LEN 5 PASS_WARN_AGE 7
解析:
PASS_MAX_DAYS 90 --> 密码有效天数,最长多久要变更密码。
PASS_MIN_DAYS 1 --> 密码变更后,最快多久才能再次修改密码。
PASS_MIN_LEN 8 --> 密码的最小设定长度。
PASS_WARN_AGE 7 --> 密码失效之前几天发出警告信息。
时间: 2024-09-27 04:56:08