Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2002 16:28:56 +0100
From:      Roman Neuhauser <neuhauser@mobil.cz>
To:        questions@freebsd.org
Subject:   Re: shutdown
Message-ID:  <20020127162856.I32706@roman.mobil.cz>
In-Reply-To: <20020127125030.S823@k7.mavetju.org>
References:  <20020127122850.R823@k7.mavetju.org> <20020127012015.X4706-100000@BLAST> <20020127125030.S823@k7.mavetju.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Sun, 27 Jan 2002 12:50:30 +1100
> From: Edwin Groothuis <edwin@mavetju.org>
> To: Bernie <Bernie_X@myrealbox.com>
> Cc: questions@freebsd.org
> Subject: Re: shutdown
> 
> On Sun, Jan 27, 2002 at 01:22:00AM +0200, Bernie wrote:
> > i was looking at the same for 'halt'
> > 
> > -r-xr-xr-x  4 root  wheel     228812 Dec 27 11:24 halt
> > 
> > seems everyone can use it...
> 
> Everybody can run it, only a few can run it succesfully:
> 
> [~] edwin@friet44>halt
> halt: Operation not permitted
> [~] edwin@friet44>groups
> wheel operator
> 
> Reading the source:
>         if (geteuid()) {
> 	    errno = EPERM;
> 	    err(1, NULL);
> 	}
> 
> The call to geteuid will always return non-zero for non-root users,
> so non-root users will not be able to run halt (reboot, fasthalt,
> fastboot)

    Unless it's setuid. I have -r-s-r-x--- root operator on both
    /sbin/halt and /sbin/reboot on two machines. 

-- 
FreeBSD 4.4-STABLE
4:25PM up 6 days, 22:48, 13 users, load averages: 0.05, 0.04, 0.00

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020127162856.I32706>