Remote Serial Console HOWTO
Prev | Chapter 9. Security | Next

# 9.10. Adjust behaviour of Ctrl-Alt-Delete

The IBM PC used Ctrl-Alt-Delete to launch a reboot of the computer. Linux traps this key chord and makes it available to the init system. This is done by sending the init process a `SIGINT` signal (although ctrlaltdel hard can undo this trap and make the key chord reboot the comptuer immediately). The init system uses `/etc/inittab` to determine how to handle the signal generated by the Ctrl-Alt-Delete key chord.

Most distributions cleanly reboot the system, mimicing the behaviour that most users expect. Figure 9-14 shows how this is done.

Figure 9-14. Default handling of Ctrl-Alt-Delete in `/etc/inittab`

    # Trap CTRL-ALT-DELETE
    ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Depending upon each individual site you may wish to disable Ctrl-Alt-Delete. This is shown in Figure 9-15.

Figure 9-15. Ignoring Ctrl-Alt-Delete in `/etc/inittab`

    # Trap CTRL-ALT-DELETE and do nothing
    ca::ctrlaltdel:

Alternatively, you may wish to cleanly shut down the computer. This is very easy to explain to operators and instructions can be displayed on the monitor using `/etc/issue` or a Post-it Note. If the computer uses Advanced Power Management (or APM) then shutting down the computer will also remove the power.

Figure 9-16. Shut down cleanly upon Ctrl-Alt-Delete in `/etc/inittab`

    # Trap CTRL-ALT-DELETE and shut down
    ca::ctrlaltdel:/sbin/shutdown -t3 -h now

Prev | Home | Next
Magic SysRq key | Up | Log attempted access