halt not by root

Paul J. Mech pmech at oucsace.cs.OHIOU.EDU
Sun Sep 25 09:55:49 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.
> 

I ran into this problem with a client of mine. I wrote a short program to
provide a warning and shut down the system, and added the following line
to /etc/passwd

	shutdown::0:0:shutdown system:/etc:/etc:/etc/dienow

(The uid and gid for root were both zero on that system. /etc/dienow was
the shutdown program.) I then assigned it a password and passed it out to
the people who were to shut down the system at night. Trying to 'su' to
shutdown produced an error, 'no shell'. And this system worked well for
two months until we had eliminated the need for an evening shutdown.
 
pjm



More information about the Comp.unix.questions mailing list