Subject: Re: Lab machines - some questions
To: Ted Lemon <>
From: Phil Knaack <>
List: port-i386
Date: 12/03/1997 15:59:08
Ted Lemon <> wrote:

>Why not just make /etc/halt and /etc/reboot setuid root?

Heh, I presume you mean /sbin/halt and /sbin/reboot. :)

The problem I see with that is that this would allow remote logins to 
reboot the machine as well (not exactly desirable if you allow remote
logins).  Of course if you only allow logins on console, this would be

I like jfw's idea of having init catch sigusr1 and spawn /sbin/reboot,
and have pcvt send sigusr1 signal to init instead of *shudder* calling

(I implemented this this morning, for kicks; its about 20 lines of code,
some to sbin/init/init.c and some to pcvt_kbd.c.  To answer your question,
jfw, yes you can call psignal from interrupt handlers. :)

I'm sure people would object to that too, for various reasons.  Perhaps
as an ifdef that is by default disabled?  Or even a config thingy somewhere
where you could control the command init runs in the event of SIGUSR1
(which would let you disable it at runtime).

Mm, wait, that sounds like Lin*x /etc/inittab or whatever it is.
Does that make it bad? :)

Speaking purely from the point of view of someone who administers a lab
of computers for people who are .. well lets face it, mostly clueless,
telling users to hit control-alt-delete (a key sequence that everyone who
has ever worked with PCs knows about) is a lot easier than teaching them to
log in and type /sbin/shutdown, just so they can go run loose95.

[Just my 2 cents.]

Phillip F Knaack
Systems Administrator, Information Development for Extension Audiences (IDEA)
Iowa State University Extension