/etc/login.defs
PASS_MAX_DAYS 99999 #密码的最大有效期, 99999:永久有期
PASS_MIN_DAYS 0 #是否可修改密码,0可修改,非0多少天后可修改
PASS_MIN_LEN 5 #密码最小长度,使用pam_cracklib module,该参数不再有效
PASS_WARN_AGE 7 #密码失效前多少天在用户登录时通知用户修改密码
/etc/pam.d/system-auth password requisite /lib/security/$ISA/pam_cracklib.so retry=3 password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow use_first_pass password required /lib/security/$ISA/pam_deny.so 修改为 password required pam_passwdqc.so min=disabled,disabled,12,8,7 max=40 passphrase=3 match=4 similar=deny random=42 enforce=everyone retry=3 #password requisite /lib/security/$ISA/pam_cracklib.so retry=3 password sufficient pam_unix.so nullok use_authtok md5 shadow use_first_pass password required /lib/security/$ISA/pam_deny.so