使用方法将其复制,保存为一个shell文件,比如security.sh.将其上传到linux服务器上,执行sh security.sh,就可以使用该脚本了!
复制代码代码如下:
#!/bin/sh 
# desc: setup linux system security 
# author:coralzd 
# powered by www.freebsdsystem.org 
# version 0.1.2 written by 2011.05.03 
#account setup 
 
passwd -l xfs 
passwd -l news 
passwd -l nscd 
passwd -l dbus 
passwd -l vcsa 
passwd -l games 
passwd -l nobody 
passwd -l avahi 
passwd -l haldaemon 
passwd -l gopher 
passwd -l ftp 
passwd -l mailnull 
passwd -l pcap 
passwd -l mail 
passwd -l shutdown 
passwd -l halt 
passwd -l uucp 
passwd -l operator 
passwd -l sync 
passwd -l adm 
passwd -l lp 
 
# chattr /etc/passwd /etc/shadow 
chattr +i /etc/passwd 
chattr +i /etc/shadow 
chattr +i /etc/group 
chattr +i /etc/gshadow 
# add continue input failure 3 ,passwd unlock time 5 minite 
sed -i 's#auth        required      pam_env.so#auth        required      pam_env.so\nauth       required       pam_tally.so  onerr=fail deny=3 unlock_time=300\nauth           required     /lib/security/$ISA/pam_tally.so onerr=fail deny=3 unlock_time=300#' /etc/pam.d/system-auth 
# system timeout 5 minite auto logout 
echo "TMOUT=300" /etc/profile 
 
# will system save history command list to 10 
sed -i "s/HISTSIZE=1000/HISTSIZE=10/" /etc/profile 
 
# enable /etc/profile go! 
source /etc/profile 
 
# add syncookie enable /etc/sysctl.conf 
echo "net.ipv4.tcp_syncookies=1"  /etc/sysctl.conf 
 
sysctl -p # exec sysctl.conf enable 
# optimizer sshd_config 
 
sed -i "s/#MaxAuthTries 6/MaxAuthTries 6/" /etc/ssh/sshd_config 
sed -i  "s/#UseDNS yes/UseDNS no/" /etc/ssh/sshd_config 
 
# limit chmod important commands 
chmod 700 /bin/ping 
chmod 700 /usr/bin/finger 
chmod 700 /usr/bin/who 
chmod 700 /usr/bin/w 
chmod 700 /usr/bin/locate 
chmod 700 /usr/bin/whereis 
chmod 700 /sbin/ifconfig 
chmod 700 /usr/bin/pico 
chmod 700 /bin/vi 
chmod 700 /usr/bin/which 
chmod 700 /usr/bin/gcc 
chmod 700 /usr/bin/make 
chmod 700 /bin/rpm 
 
# history security 
 
chattr +a /root/.bash_history 
chattr +i /root/.bash_history 
 
# write important command md5 
cat > list << "EOF" && 
/bin/ping 
/bin/finger 
/usr/bin/who 
/usr/bin/w 
/usr/bin/locate 
/usr/bin/whereis 
/sbin/ifconfig 
/bin/pico 
/bin/vi 
/usr/bin/vim 
/usr/bin/which 
/usr/bin/gcc 
/usr/bin/make 
/bin/rpm 
EOF 
 
for i in `cat list` 
do 
   if [ ! -x $i ];then 
   echo "$i not found,no md5sum!" 
  else 
   md5sum $i  /var/log/`hostname`.log 
  fi 
done 
rm -f list 
本文出自 崔晓辉的博客 http://coralzd.blog.51cto.com/90341/564887 
系统安全,shell
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
 - 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
 - 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
 - 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
 - 群星《2024好听新歌42》AI调整音效【WAV分轨】
 - 王思雨-《思念陪着鸿雁飞》WAV
 - 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
 - 李健《无时无刻》[WAV+CUE][590M]
 - 陈奕迅《酝酿》[WAV分轨][502M]
 - 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
 - 群星《吉他王(黑胶CD)》[WAV+CUE]
 - 齐秦《穿乐(穿越)》[WAV+CUE]
 - 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
 - 邝美云《邝美云精装歌集》[DSF][1.6G]
 - 吕方《爱一回伤一回》[WAV+CUE][454M]