命令:
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
PASS_MIN_DAYS
PASS_MIN_LEN
PASS_WARN_AGE
解析:
PASS_MAX_DAYS 90 --> 密码有效天数,最长多久要变更密码。
PASS_MIN_DAYS 1 --> 密码变更后,最快多久才能再次修改密码。
PASS_MIN_LEN 8 --> 密码的最小设定长度。
PASS_WARN_AGE 7 --> 密码失效之前几天发出警告信息。