Path: utzoo!utgpu!water!watmath!clyde!att!oucsace!pmech
From: pmech@oucsace.cs.OHIOU.EDU (Paul J. Mech)
Newsgroups: comp.unix.questions
Subject: Re: halt not by root
Summary: Another way
Keywords: halt ! not root
Message-ID: <287@oucsace.cs.OHIOU.EDU>
Date: 24 Sep 88 23:55:49 GMT
References: <1128@usfvax2.EDU>
Organization: Ohio University CS Dept., Athens
Lines: 20

In article <1128@usfvax2.EDU>, ssi@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