[comp.sys.next] Inhibiting power-down button and "power" user?

pentch@milton.u.washington.edu (Dean Pentcheff) (07/11/90)

We're about to configure our stand-alone NeXT as a server on an NFS
network.  Obviously, we'd like to inhibit the power-down key on the
keyboard.

In the NeXT Reference there are some instructions on how to do this
(using root's defaults database, set loginwindow's PowerOffDisabled
parameter).  I can't get that to work - to exactly what must
PowerOffDisabled be set?  Are there weird permissions I need to set?

Secondly, NeXT suggests setting up a user named "power" with
loginwindow's Workspace parameter set to "/usr/etc/halt -p" (so that
you can get the machine shut down without logging in as root).  I can't
get that to work either.  I have user "power" in group "wheel" and
/usr/etc/halt has wheel group execute permission...  What else should I
try?  Are there other magical permissions to set?

Thanks for any suggestions.

-Dean

-- 
Dean Pentcheff  (pentch@u.washington.edu)
Department of Integrative Biology, University of California, Berkeley CA 94720
Presently at:  Friday Harbor Labs, 620 University Rd., Friday Harbor, WA 98250

lane@sumex-aim.stanford.edu (Christopher Lane) (07/12/90)

In <4941@milton.u.washington.edu>, pentch@milton.u.washington.edu writes:
> ...
> In the NeXT Reference there are some instructions on how to do this
> (using root's defaults database, set loginwindow's PowerOffDisabled
> parameter).  I can't get that to work - to exactly what must
> PowerOffDisabled be set?  Are there weird permissions I need to set?

As 'root', I did: 'dwrite loginwindow PowerOffDisabled true' and it works
fine, but of course you have to restart the loginwindow to take effect.

>Secondly, NeXT suggests setting up a user named "power" with
>loginwindow's Workspace parameter set to "/usr/etc/halt -p" (so that
>you can get the machine shut down without logging in as root).  I can't
>get that to work either.

I played around with this and finally settled on the following solution.  I
added the user 'power' with the passwd entry:

    power::5:0:Power Off the Machine:/private/power:/bin/nologin

(You'll probably want a password for yours!).  The user id isn't significant
but the group id is.  In the 'power' user's home directory, I put the
(executable) sh script 'poweroff' which contains the line:

    /usr/etc/halt -p

Then, as 'power' I did 'dwrite Workspace LaunchThese poweroff'.  Thus when
you login as 'power', the machine shuts itself off (after a slight wait).  The
protection of /usr/etc/halt is set to '-rwsr-s---'.

I hope this helps (I also hope my description is complete :-).

- Christopher
-------