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

Advertisements

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.


January 1st, 2009 Written by The Digitizor    

Free subscription: Subscribe RSS feed or get daily tips in your email
* Click confirmation link sent in email * Don't see the email? check spam folder

  Facebook 


Liked it? Share...   Digg It!   Submit to Del.icio.us   Submit to Reddit   Stumble   Submit to Identica   Slashdot It   Send to a friend via email


blog comments powered by Disqus