How to disable system reboot when pressing Ctrl+Alt+DEL on CentOS 6.x

Hitting CTRL-ALT-DELETE on most Linux distributions will start the soft reboot process. Normally I prefer to disable this (at least on production systems) because someone might make a mistake and reboot the system, specially those who are used to administrate Windows servers. Also what I don’t like about this shortcut is that you don’t need to be logged in (no user/password needed – but only console access) to reboot the system.

To disable this behavior, open the /etc/init/control-alt-delete.conf configuration file in a text editor such as vi or nano.
Then replace the actual shutdown action with a less harmful one:

# control-alt-delete - emergency keypress handling
# This task is run whenever the Control-Alt-Delete key combination is
# pressed. Usually used to shut down the machine.

start on control-alt-delete

#exec /sbin/shutdown -r now "Control-Alt-Delete pressed"

The init daemon should automagically reload this change, but just to be sure run this command:

initctl reload-configuration


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s