CentOS6.2禁止使用alt+ctrl+delete快捷键重启服务器

我们在管理的时候,为了避免误操作ctrl+alt+del 引起系统的重启,所以,我们需要把这个功能注释掉,在centos5.* 下,是在/etc/inittab这个文件中修改注释掉就可以了,于是乎在我的centos6.2下,我也这样操作,但是打开这个文件。就傻眼了,啥都没有啊:

# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:

 最后反复仔细看了看文件内容和注释,才发现图中标注的那一行内容,原来,不是修改这个文件,是修改别的地方了:

#vim /etc/init/control-alt-delete.conf
#exec /sbin/shutdown -r now "Control-Alt-Delete pressed"


 这个时候你再同时按下这个3个组合键,试试效果吧。。。

你可能感兴趣的:(centos6.2)