You Are Here: Home » How-To » Linux » Security

Disabling Shutdown Via Ctrl-Alt-Del on a Linux box

By Debjit on April 21st, 2011 
Advertisement

By default, the /etc/inittab specifies that your system will reboot on pressing the Ctrl-Alt-Del key combination used at the console. To completely disable this feature, comment out the following line in /etc/inittab file (you will need admin privileges for this)  by putting a hash mark (#) in front of itand save the file:

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

You may also want some non-root users to be still able to shutdown the system using Ctrl-Alt-Del key combination, and for this provisions are available. Do the following:

  1. Add the -a option to the /etc/inittab line shown above, so that it reads:
    ca::ctrlaltdel:/sbin/shutdown -a -t3 -r now
  2. Create a file named shutdown.allow in /etc. The shutdown.allow file should list the usernames of any users who are allowed to shutdown the system using Ctrl-Alt-Del , as shown beloW:
#shutdown.allow file
user1
user2
user3
.
.
.
.
userN
the -a switch in the above modified line only tells the shutdown script to look for a shutdown.allow file.

Advertisement







Disabling Shutdown Via Ctrl-Alt-Del on a Linux box was originally published on Digitizor.com on January 1, 2009 - 10:47 am (Indian Standard Time)