内容摘要:本文介绍了Linux从安装到配置所有的安全设置,非常值得一看。
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位标志。
来源:51CTO.com 作者:xueyan 责编:豆豆技术应用