Linux system password security configuration complexity

Password expiration control

In the file /etc/login.defsset, the following parameters

PASS_MAX_DAYS   180  #密码最长过期天数
PASS_MIN_DAYS   30  #密码最小过期天数
PASS_MIN_LEN    12  #密码最小长度
PASS_WARN_AGE   20   #密码过期警告天数

Password Complexity Control

By /etc/pam.d/system-authfile

password requisite pam_cracklib.so retry=5 difok=3 minlen=10 ucredit=-1 lcredit=-3 dcredit=-3 dictpath=/usr/share/cracklib/pw_dict

Or /etc/security/pwquality.conffiles to control

# 修改密码,可以重试的次数
retry=5
# 与旧密码不同的字符个数
Difok=3
# 最小长度
minlen=8
# 包含数字个数
dcredit=3
# 包含大写字母个数
ucredit=1
# 包含小些字母个数
lcredit=1
# 包含特殊字符个数
ocredit=1

Guess you like

Origin www.cnblogs.com/lukefan/p/11133230.html