系统安全性1设置登录超时退出机制/etc/profile中加入:TMOUT=180---3分钟无操作,退出source/etc/profile--即时生效2历史记录/etc/profile中修改:HISTSIZE=30---保留历史记录30条source/etc/profile--即时生效3登录策略/etc/pam
d/system-auth中:authrequiredpam_env
so下面添加:authrequiredpam_tally
soonerr=failno_magic_rootdeny=3unlock_time=300账户连续3次输入密码错误,锁定5分钟4账户策略/etc/login
defs中修改PASS_MAX_DAYSPASS_MIN_DAYS90#新建用户的密码最长使用天数0#新建用户的密码最短使用天数PASS_MIN_LEN8#密码最小长度PASS_WARN_AGE7#新建用户的密码到期提前提醒天数/etc/pam
d/system-auth中添加:passwordrequisitepam_cracklib
sotry_first_passretry=3minlen=8lcredit=-1ucredit=-1dcredit=-1ocredit=-1---passwd最小长度为8--passwordrequisitepam_cracklib
sotry_first_passretry=3minlen=8lcredit=-1ucredit=-1dcredit=-1ocredit=-1difok=3---新密码和旧密码不能有3个以上字符重复---passwordsufficientpam_unix
somd5shadownulloktry_first_passuse_authtokremember=5---以前的5次之内的密码不能使用---此设置如果要生效