系统等保整改记录
* 修改密码复杂度
在文件/etc/security/pwquality.conf中去掉以下注释:
dcredit = 1
ucredit = 1
lcredit = 1
ocredit = 1
查看
grep -v '#' /etc/security/pwquality.conf
* 配置日志保存时间
修改文件/etc/logrotate.conf中rotate的值:
rotate 26
查看
grep -v "#" /etc/logrotate.conf | grep -v "^$"
* 更改服务器密码有效期和长度
编辑/etc/login.defs文件:
PASS_MAX_DAYS 181
PASS_MIN_LEN 8
查看
grep 'PASS' /etc/login.defs
* 设置系统15分钟无操作自动断开连接
在/etc/profile末尾增加配置:
export TMOUT=900
验证
set |grep TMOUT
* 设置系统用户登录失败5次,锁定10分钟
在/etc/pam.d/login末尾增加配置:
auth required pam_tally2.so deny=5 unlock_time=600 even_deny_root root_unlock_time=600