My OS is RHEL 6.2
I disable Ctrl+Alt+Del by changing in /etc/init/control-alt-del.conf
the line
exec /sbin/shutdown -r now "Control-alt-del pressed"
by
exec /bin/true
I'll be testing it next Sunday.
My questions:
-
are there any daemons to restart?
-
I keep a copy on original
/etc/init/control-alt-del.conf
in /etc/init, is it safe?
I mean won't the shutdown part of exec be fired? -
more official way to disable Ctrl+Alt+Del?
edit:
tested on vmware player 6.0.3 (for what it is worth, this is not a virtualization issue)
- editing file, no exec line, no restart, user logged on gui, send Ctrl+Alt+Del : shutdown prompt
- after restart, no exec line, user logged on gui, send Ctrl+Alt+Del : shutdown prompt
- after restart, exec /bin/true, user logged on gui, send
Ctrl+Alt+Del : shutdown prompt - after restart, exec /bin/true, no user logged on gui, send
Ctrl+Alt+Del : no shutdown prompt
Best Answer
Since this is the way to enable a function that acts on pressing Ctrl+Alt+Del, it is also the, probably official, point to switch if off.
You should just comment out ('#' in front of the line) the
exec shutdown...
and there is no need to insertexec /bin/true
. No need to keep a copy of the file if you just comment things out.I would reboot the system after the change, as I think it is init itself that reads that file, not some daemon. Just changing the file without further action doesn't have any effect¹.
¹ In the good old days you would set the Ctrl+Alt+Del handling in
/etc/inittab
and you could issue ainit q
after a change.