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

In this article we will tell you how you can easily disable the Ctrl+Alt+Del key combinations and prevent shutting down of your linux system?

By default, the /etc/inittab specifies that your system will reboot on pressing the CtrlAltDel 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 CtrlAltDel 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 CtrlAltDel , 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.

If this sounds like your situation, let's talk

No pitch decks. No sales process. Just a conversation about what you're dealing with and whether I can help.

Book a 30-minute call →