Re: turning off computer
Date: Wed, 5 Mar 1997 18:58:20 -0500 (EST)
From: I Brake for Moths <rikki@zool46.bio.utk.edu>
Is there a way for a user without root priveleges to cleanly
unmount the root file system and shutdown the computer?
Yes, they just need to log in and give the three fingered salute,
after you give them permission. Here's what you need to know (mostly
from 'man shutdown'):
Shutdown can be called from init(8) when the magic keys
CTRL-ALT-DEL are pressed, by creating an appropriate entry in
/etc/inittab (already done for you on most debian systems). To
prevent this, shutdown can check to see if an authorized user
is logged in on a virtual console (not an X session, mind
you). 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 users 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
shutdown: no authorized users logged in
to the (physical) system console. The format of /etc/shut-
down.allow is one user name per line. Empty lines and com- ment
lines (prefixed by a #) are allowed. Currently there is a limit
of 32 users in this file.
I hope this helps. Happy shutdowning.
Reply to: