Re: Why sudo does it ?

1998-12-15 Thread john
Joe Emenaker writes:
> If you just call "halt" yourself, you're probably going to get some
> filesystem curruption.

Unless you are an old Unix hacker, in which case you will type 
'sync; sync; halt'.

-- 
John HaslerThis posting is in the public domain.
[EMAIL PROTECTED]  Do with it what you will.
Dancing Horse Hill Make money from it if you can; I don't mind.
Elmwood, Wisconsin Do not send email advertisements to this address.


Re: Why sudo does it ?

1998-12-15 Thread Joe Emenaker
>> I'm guessing that reboot != shutdown -r "now".  Try running:
>> sudo shutdown -r "now"


Uh. no. Last time I checked, it wasn't even close.

The story I've always heard is that you shouldn't run halt or reboot
yourself. Those are run by "shutdown" as the last thing it does. "shutdown"
unmounts all of the filesystems, flushes buffers, kills daemons, etc. etc..
and THEN either calls reboot or halt. If you just call "halt" yourself,
you're probably going to get some filesystem curruption.

- Joe


Re: Why sudo does it ?

1998-12-14 Thread shaul
> On Fri, 11 Dec 1998, shaul wrote:
> 
> > [01:53:38 shaul]$ sudo -l
> > You may run the following commands on this host:
> > (root) /sbin/halt
> > (root) /sbin/shutdown -r "now"
> > (root) /sbin/shutdown -h "now"
> > [01:55:14 shaul]$ sudo reboot
> > Sorry, user shaul is not allowed to execute "/sbin/reboot" as root on 
> > rakefet.
> 
> I'm guessing that reboot != shutdown -r "now".  Try running:
> sudo shutdown -r "now"
> 

It didn't work. Apparently my problem was the line
Cmnd_Alias  SHUTDOWN=/sbin/shutdown -r "now"
which I assumed that will let me do what I want.

After reading your response, I changed my sudoers file. Currently, it is:

[16:57:12 shaul]# cat /etc/sudoers 
# sudoers file (/etc/sudoers).
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

##
# Cmnd alias specification
##
Cmnd_Alias  HALT=/sbin/halt

##
# User privilege specification
##

# root can run anything on any machine as any user
rootALL=(ALL) ALL

# shaul may run these commands:
shaul   ALL=HALT, /sbin/shutdown -[hr] now
[16:59:15 shaul]# exit  
[17:00:53 shaul]$ sudo -l

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

#1) Respect the privacy of others.
#2) Think before you type.

Password: 
You may run the following commands on this host:
(root) /sbin/halt
(root) /sbin/shutdown -[hr] now
[17:01:56 shaul]$ 






Re: Why sudo does it ?

1998-12-11 Thread Brandon Mitchell
On Fri, 11 Dec 1998, shaul wrote:

> [01:53:38 shaul]$ sudo -l
> You may run the following commands on this host:
> (root) /sbin/halt
> (root) /sbin/shutdown -r "now"
> (root) /sbin/shutdown -h "now"
> [01:55:14 shaul]$ sudo reboot
> Sorry, user shaul is not allowed to execute "/sbin/reboot" as root on rakefet.

I'm guessing that reboot != shutdown -r "now".  Try running:
sudo shutdown -r "now"

HTH,
Brandon

+---  ---+
| Brandon Mitchell * [EMAIL PROTECTED] * http://bhmit1.home.ml.org/ |
|  Sometimes you have to release software with bugs. - MS Recruiter  |