精品推荐
Linux安全配置步骤简述
日期:2008年5月15日 作者: 查看:[大字体
中字体 小字体 ]
[root@deep]# chmod 600 /etc/lilo.conf (不再能被其他用户可读). [root@deep]# /sbin/lilo -v (更新lilo配置). [root@deep]# chattr +i /etc/lilo.conf(阻止该文件被修改) 18. 禁止 Control-Alt-Delete 重启动机器命令 [root@deep]# vi /etc/inittab ca::ctrlaltdel:/sbin/shutdown -t3 -r now To #ca::ctrlaltdel:/sbin/shutdown -t3 -r now [root@deep]# /sbin/init q 19. 重新设置/etc/rc.d/init.d/目录下所有文件的许可权限 [root@deep]# chmod -R 700 /etc/rc.d/init.d/* 仅仅root可以读,写,执行上述所有script file. 20. The /etc/rc.d/rc.local file 默认地,当你login到linux server时,它告诉你linux版本名,内核版本名和服务器 主机名。它给了你太多的信息,如果你就希望得到提示login: ,编辑 /etc/rc.d/rc.local放#在下面的行前面: -- # This will overwrite /etc/issue at every boot. So, make any changes you # want to make to /etc/issue here or you will lose them when you reboot. #echo "" > /etc/issue #echo "$R" >> /etc/issue #echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue # #cp -f /etc/issue /etc/issue.net #echo >> /etc/issue -- 然后,做下面的事情: [root@deep]# rm -f /etc/issue [root@deep]# rm -f /etc/issue.net [root@deep]# touch /etc/issue [root@deep]# touch /etc/issue.net 21. 被root拥有的程序的位。 移走那些被root拥有程序的s位标志,当然有些程序需要这个,用命令‘chmod a-s’完成这个。 注:前面带(*)号的那些程序一般不需要拥有s位标志。 [root@deep]# find / -type f \( -perm -04000 -o -perm -02000 \) \-exec ls –lg {} \; -rwsr-xr-x 1 root root 33120 Mar 21 1999 /usr/bin/at *-rwsr-xr-x 1 root root 30560 Apr 15 20:03 /usr/bin/chage *-rwsr-xr-x 1 root root 29492 Apr 15 20:03 /usr/bin/gpasswd -rwsr-xr-x 1 root root 3208 Mar 22 1999 /usr/bin/disable-paste -rwxr-sr-x 1 root man 32320 Apr 9 1999 /usr/bin/man -r-s--x--x 1 root root 10704 Apr 14 17:21 /usr/bin/passwd -rws--x--x 2 root root 517916 Apr 6 1999 /usr/bin/suidperl -rws--x--x 2 root root 517916 Apr 6 1999 /usr/bin/sperl5.00503 -rwxr-sr-x 1 root mail 11432 Apr 6 1999 /usr/bin/lockfile -rwsr-sr-x 1 root mail 64468 Apr 6 1999 /usr/bin/procmail -rwsr-xr-x 1 root root 21848 Aug 27 11:06 /usr/bin/crontab -rwxr-sr-x 1 root slocate 15032 Apr 19 14:55 /usr/bin/slocate *-r-xr-sr-x 1 root tty 6212 Apr 17 11:29 /usr/bin/wall *-rws--x--x 1 root root 14088 Apr 17 12:57 /usr/bin/chfn *-rws--x--x 1 root root 13800 Apr 17 12:57 /usr/bin/chsh *-rws--x--x 1 root root 5576 Apr 17 12:57 /usr/bin/newgrp *-rwxr-sr-x 1 root tty 8392 Apr 17 12:57 /usr/bin/write -rwsr-x--- 1 root squid 14076 Oct 7 14:48 /usr/lib/squid/pinger -rwxr-sr-x 1 root utmp 15587 Jun 9 09:30 /usr/sbin/utempter
复制本页网址和标题,发送给你QQ/Msn的好友一起分享
上一篇:系统进程问答集锦
下一篇:关于传说中的拒绝服务攻击CC
相关文章:
相关软件: