And I quote from The Excellent Manual:

          If
          shutdown is called from init, it checks to see if the file
          /etc/shutdown.allow  is  present.   It  then  compares the
          login names in that file with the list of people that  are
          logged  in on a virtual console (from /var/run/utmp). Only
          if one of those authorized users or root is logged in,  it
          will proceed. Otherwise it will write the message...

What you need to do is to not run shutdown from the command line. Instead,
you would do something like an
init 6
which would do almost what you want. Be aware that shutdown can be used to
do a shutdown followed by a halt OR a shutdown followed by a reboot. The
init 6 will be default do a reboot. The mods to make init 6 do a halt is
left as an excersize for the student. ;-)



Date: Fri, 22 May 1998 12:50:59 +0000 (GMT)
From: Craig Kattner <[EMAIL PROTECTED]>
To: RedHat List <[EMAIL PROTECTED]>
Subject: question about shutdown
Message-ID: <[EMAIL PROTECTED]>
Content-Type: TEXT/PLAIN; charset=US-ASCII

According to the man page for shutdown, I can create a file in /etc called
shutdown.allow with a user name per line to allow that user to shutdown
the system. I have created said file and added the user I want to be able
to shut down as to it, but if I run "/sbin/shutdown -r now" it says that
only root can shut the system down. I can chmod +s shutdown and then a
normal user can shut the system down, but I only want this one user to be
able to do so. How can I get around this? Thanks.


-Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED]
-Stranger things have happened but none stranger than this. Steven W. Orr-
Does your driver's license say Organ Donor?Black holes are where God \
-------divided by zero. Listen to me! We are all individuals!---------


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to