Tuesday, April 14, 2009

Disable the Ctrl-Alt-Delete shutdown keys

For people who have recently migrated from MS boxes to Nix ones have a habit of using Ctrl+Alt+Del keys for popping up Task Manager or to simply lock the workstation but using that combination on Linux box is hazardous as it shuts down the machine.

So I recommend on disabling Ctrl+Alt+Del keys on your workstation, even on production systems it is recommended that you disable it

It is configured using /etc/inittab (used by sysv-compatible init process) file. The inittab file describes which processes are started at bootup and during normal operation. You need to open this file and remove (or comment it) ctrlaltdel entry.

Ctrlaltdel specifies the process that will be executed when init receives the SIGINT signal. SIGINT is the symbolic name for the signal thrown by computer programs when a user wishes to interrupt the process, for example reboot/shutdown system using [Ctrl]-[Alt]-[Del].). This means that someone on the system console has pressed the CTRL-ALT-DEL key combination. Typically one wants to execute some sort of shutdown either to get into single-user level or to reboot the machine.

How-To disable Ctrl+Alt+Del Keys:

Open /etc/inittab file, enter:
# vi /etc/inittab

Search for line that read as follows:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

And remove the line or comment out the above line by putting a hash mark (#) in front of it:
# ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

Save the file and exit to shell promot. Reboot system to take effect or type command:
# init q

No comments:

Post a Comment