halt not by root

Steve DeJarnett steve at polyslo.CalPoly.EDU
Wed Sep 21 04:20:27 AEST 1988


In article <1128 at usfvax2.EDU> ssi at usfvax2.EDU (Ssi) writes:
>I run a Sun file server with clients. My question is
>how can I give halt(8) permission to users other than
>root. We shut the system down at night and root is
>at home.

	Well, one solution (not a good one, by any means, but it is quick and
easy) is to make halt(8) group executable (not world) and make it setuid to 
root.  As we all know, setuid programs aren't a great idea, and setuid root
programs are an even worse idea.  I think you probably wouldn't want halt(8)
to be executable, but something more along the lines of shutdown(8).  Halting
a machine running in multi-user mode isn't a good idea (might just as well
sync the disks and shut the machine off :-).  The same caveats apply to making
shutdown setuid as well as halt (only do one of these!!).

	The real question is, do you NEED to shut this machine down every night?
Is it such a power hog that you can't leave it running???

-------------------------------------------------------------------------------
| Steve DeJarnett            | Smart Mailers -> steve at polyslo.CalPoly.EDU     |
| Computer Systems Lab       | Dumb Mailers  -> ..!ucbvax!voder!polyslo!steve |
| Cal Poly State Univ.       |------------------------------------------------|
| San Luis Obispo, CA  93407 | BITNET = Because Idiots Type NETwork           |
-------------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list