In Linux , It’s a security concern for us to allow anyone to reboot the server using Ctrl-Alt-Del keys. It is always recommended in production boxes that one should disable reboot using Ctrl-Alt-Del keys.
In this article we will discuss how can we disable reboot via above keys in RHEL & CentOS
To prevent the init process from handling Ctrl-Alt-Del, edit the file ‘/etc/inittab‘ comment the line which begins with ‘ca::ctrlaltdel:‘ as shown below :
We can also modify the line ‘ca::ctrlaltdel:’ to generate logs , if anybody try to reboot the server using the keys ,
In RHEL 6.X / CentOS 6.X , reboot using the keys are handled by the file ‘/etc/init/control-alt-delete.conf‘.
Step:1 Before making the changes , first take the backup using below command
Step:2 Edit the file , replacing the ‘exec /sbin/shutdown’ line with the following, which will simply generate a log entry each time Ctrl-Alt-Del is pressed:
Run either of the beneath command from the console to disable reboot using ‘CTRL+ALT+DELETE’ keys in RHEL 7.x and CentOS 7.x
OR