Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Feb 2005 19:33:47 -0800
From:      Tabor Kelly <tkelly-freebsd-questions@taborandtashell.net>
To:        Ned Harrison <nedsmailbox2@cox.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Very general shutdown question
Message-ID:  <4206E19B.6050503@taborandtashell.net>
In-Reply-To: <200502061646.27199.nedsmailbox2@cox.net>
References:  <200502061646.27199.nedsmailbox2@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Ned Harrison wrote:
> I run FreeBSD 5.3 on my home PC in a stand alone machine as a desktop.   Is it 
> possible to set it up so an ordinary user can shut the system?  I've created 
> a couple of accounts that are not in the wheel group so I can give friends 
> and house guests the chance to play on a non-Microsoft system.   I don't want 
> to give them root access just to shut it down.
> 
> None of the books which I have discuss using FreeBSD in this way.  They are 
> mostly geared to setting up networks running it for businesses.  Areas where 
> one may not want an ordinary user to be able to shutdown the machine.  
> However, I prefer having the machine off when I'm not on it.  If it's not 
> possible that fine I can continue working around it like I do now.
> 
> Thank you
> Ned

As you have probably noticed, their are lots of ways to do this. IMHO 
the easiest would be a SUID root script. That is a script owned by root 
that has the SUID (set user id) bit set. It should have one line: 'halt' 
(or whatever 'shutdown -*' you want).

-- 

Tabor Kelly
tkelly-freebsd-questions@taborandtashell.net
http://tabor.taborandtashell.net



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