1 服务器设置密码规则
password requisite pam_pwquality.so minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1 try_first_pass local_users_only retry=3 authtok_type=
minlen 密码长度;lcredit 小写字母;ucredit 大写字母,dcredit 数字;enforce_for_root 密码的复杂度也作用于root用户
2 服务器设置登录锁定策略
auth required pam_tally2.so deny=3 unlock_time=5 even_deny_root root_unlock_time=10
auth required pam_tally2.so deny=3 unlock_time=5 even_deny_root root_unlock_time=10
even_deny_root #同时也限制root用户;
deny #设置普通用户和root用户连续错误登陆的最大次数,超过最大次数,则锁定该用户;
unlock_time #设定普通用户锁定后,多少时间后解锁,单位是秒;
root_unlock_time #设定root用户锁定后,多少时间后解锁,单位是秒;