Search Posts on Binpipe Blog

Disabling Ctrl+Alt+Delete Reboot Shortcut in Linux Systems

Pressing CTRL+ALT+DELETE on most Linux distributions will start the soft reboot process. On production systems, it is advisable to disable this because someone might make a mistake and reboot the system, specially those who are used to administrate Windows servers. Also what is strange 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, nano or pico. (The same settings are present in /etc/inittab in RHEL/CentOS 5 systems)
Then replace the actual shutdown action with an alert:

# 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"
exec echo "CONTROL-ALT-DELETE DISABLED BY ADMIN"

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

initctl reload-configuration

No comments:

Post a Comment

Hi, Leave a comment here and one of the binary piper's will reply soon :)