[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] Re : HALT by a user
On Wed, 27 Oct 1999, Sojan James wrote:
+ On Wed, 27 Oct 1999, Bilal Muddassir wrote:
+
+ > How to disable the CTRL+ALT+DEL thing so that only root can do halt
+
+ # Trap CTRL-ALT-DELETE
+ ca::ctrlaltdel:/sbin/shutdown -t3 -r now
+ <\snip>
+
+ You could change the command to be executed to something displaying an
+ error message.
+
>From 'man 8 shutdown' page,
<quote>
Access Control
Shutdown can be called from init(8) when the magic keys
CTRL-ALT-DEL are pressed, by creating an appropriate entry
in /etc/inittab. This means that everyone who has physical
access to the console keyboard can shut the system down.
To prevent this, shutdown can check to see if an autho-
rized user is logged in on one of the virtual consoles. If
shutdown is called from init, it checks to see if the file
/etc/shutdown.allow is present. It then compares the
login names in that file with the list of people that are
logged in on a virtual console (from /var/run/utmp). Only
if one of those authorized users or root is logged in, it
will proceed. Otherwise it will write the message
</quote>
What you need is just a 'shutdown.allow' file in /etc with proper entries.
Sharad.
-=-=-=-=-=-
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.