Path: utzoo!attcan!uunet!decwrl!ucbvax!agate!shelby!daemon From: lane@sumex-aim.stanford.edu (Christopher Lane) Newsgroups: comp.sys.next Subject: re: Inhibiting power-down button and "power" user? Message-ID: <2207@shelby.Stanford.EDU> Date: 11 Jul 90 18:29:39 GMT Sender: daemon@shelby.Stanford.EDU Lines: 34 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 -------