Website of latouche

[home] [Computers and networks] [tips]

Protection against not wanted reboots

Delay the reboot

Rebooting a system by mistake is really easy, especially for those with many terminal opened to many servers, it's easy to write shutdown -r in the wrong terminal. The option -c of shutdown allows you to cancel a reboot. Combined with a delayed reboot, it can avoid many mistakes. shutdown -r 1 will reboot the server only after waiting 1 minute, which give you time to cancel it.


By default, ctrl-alt-suppr will reboot the computer. This is configured in /etc/inittab:

ca:12345:ctrlaltdel:/sbin/shutdown -r now
If you want to disable it, simply change the concerned line. Particularly for public computers and servers that are not physicaly protected.

It is also possible to restrict the usage of shutdown to a list of logged users using the -a option. The list is defined in /etc/shutdown.allow (on user per line) while logged users can be found in /var/run/utmp. This option can be really usefull for ctrl-alt-suppr if set in the inittab.

Last update: 2007/05/30