Re: turning off computer
On Wed, 5 Mar 1997, I Brake for Moths wrote:
> Is there a way for a user without root priveleges to cleanly unmount the
> root file system and shutdown the computer?
>
> I've been running 'init 0' as root before turning off the box, but I
> don't want to have to give out the root password to my family (it's bad
> enough that I know it!) just so they can turn the thing off when I'm not
> around. We'd rather not leave it on when it is not in use.
Look at the /etc/inittab, there is a line:
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now
The default key map binds this function ctrl-alt-del, change the -r to -h
and it will halt the system instead of rebooting it. Incidently, I've
always used halt or shutdown -h now instead of init 0 to shutdown the
machine..
Alternatively you could setuid shutdown, but binding it to a key seems
safer as any remote hacker can't go nutz on your system ;>
Jason
Reply to: