By default, the Linux system uses the/etc/inittab file to control whether reboot or shutdown is performed when the system simultaneously presses the -- combination key before the system terminal. If you want to, you can completely disable this function. In this file:
Ca: ctrlaltdel:/sbin/shutdown-t3-r now
Add the annotator "#" to the beginning. In addition, we can also customize some non-root users to have the right to press ctrl-alt-delete in front of the console to shut down the system. The procedure is as follows:
1. Add the-a tag in the above configuration. For example:
Ca: ctrlaltdel:/sbin/shutdown-a-t3-r now
-A flag notifies the shutdown program to view the/etc/shutdown. allow file, which will be created below
2. Create the shutdown. allow file in the/etc/directory, which lists the usernames that can be disabled by pressing the ctrl-alt-delete combination button. The Shtdown. allow file format is one user per line:
Chenlf
Peter
Oracle8i
For the above example, the system will allow the user chenlf, peter, and oracle8i to close the system by pressing -- in front of the console. When a user uses the combination key --, shutdown checks/etc/shutdown. whether the user (or root) in allow is currently logged on through the virtual terminal. If any of them is logged on, shutdown will continue; otherwise, an error message will be returned:
No authorized users logged in