[SLUG] shutdown: you must be root to do that!
Al Girling
al at sdf-eu.org
Thu Sep 18 16:09:02 BST 2003
On Thu, Aug 21, 2003 at 12:44:06PM +0100, Gavin Baker wrote:
> Q: How do you give permission to shutdown(8) the machine to regular
> users?
<snip>
> If we only want users from a special group to be able to execute it, we
> can just make it only executable by the owner and group
>
> $ chmod o-wrx /sbin/shutdown (giving -rwsr-x---)
>
> and then change the group owner to our special group. Debian has an adm
> group, which seems appropriate. (but we could just create a new
> shutdown, or wheel group of course).
>
> $ chown root.adm /sbin/shutdown
>
> -rwsr-x--- 1 root adm 16632 2002-05-28 12:27 /sbin/shutdown
>
> So anyone we want to let shutdown the machine, we can just add to the
> adm group.
>
> $ adduser fred adm
>
<snip>
Hi Gav,
I've just got round to trying this. Everything seemed to go well until trying
out the command when I simply get the message;
bash: shutdown: command not found
The following commands and their output suggest to me I followed your
instructions correctly.
# ls -l /sbin/shutdown
gives me
-rwxr-x--- 1 root adm 15496 May 29 2002 /sbin/shutdown
and
$ grep adm /etc/group
adm:x:4:al
would I be right to assume 'shutdown' will remain unavailable to me until I
add '/sbin' to my $PATH? I can't say why, but that seems rather unsafe to me.
Any thoughts or ideas?
Al
P.S. Details of printer setup on there way!
--
Al Girling Registered Linux User: 290080
http://counter.li.org
More information about the Scarborough
mailing list