[gentoo-user] SUDO: running /etc/init.d/cupsd restart

2006-12-04 Thread jak gentoo

Hi all,

I'm trying to allow users in the wheel group to run /etc/init.d/cupsd
restart
I edited /etc/sudoers with visudo to the following but it doesn't work, any
ideas?

%wheel ALL=(ALL)NOPASSWD: /sbin/runscript.sh
%wheel ALL=(ALL)NOPASSWD: /etc/init.d/cupsd restart

when I try with my normal acount I get
[EMAIL PROTECTED] ~ $ /etc/init.d/cupsd restart
* /sbin/runscript.sh: must be root to run init scripts
but I'm in the wheel group
[EMAIL PROTECTED] ~ $ id
uid=1000(jak) gid=100(users) groups=10(wheel),100(users)

Regards

jakommo


Re: [gentoo-user] SUDO: running /etc/init.d/cupsd restart

2006-12-04 Thread Neil Bothwick
On Mon, 4 Dec 2006 13:54:52 +0100, jak gentoo wrote:

 I'm trying to allow users in the wheel group to run /etc/init.d/cupsd
 restart
 I edited /etc/sudoers with visudo to the following but it doesn't work,
 any ideas?
 
 %wheel ALL=(ALL)NOPASSWD: /sbin/runscript.sh
 %wheel ALL=(ALL)NOPASSWD: /etc/init.d/cupsd restart
 
 when I try with my normal acount I get
 [EMAIL PROTECTED] ~ $ /etc/init.d/cupsd restart
  * /sbin/runscript.sh: must be root to run init scripts
 but I'm in the wheel group

The settings in /etc/sudoers only apply when running a command with sudo,
try sudo /etc/init.d/cupsd restart


-- 
Neil Bothwick

Windows 98, the most installed system in the world, I know, I've done it
5 or 6 times myself.


signature.asc
Description: PGP signature


Re: [gentoo-user] SUDO: running /etc/init.d/cupsd restart

2006-12-04 Thread Daniel Waeber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

jak gentoo wrote:
 Hi all,
 
 I'm trying to allow users in the wheel group to run /etc/init.d/cupsd
 restart
 I edited /etc/sudoers with visudo to the following but it doesn't work, any
 ideas?
 
 %wheel ALL=(ALL)NOPASSWD: /sbin/runscript.sh
You won't need the line above, it would be a risk if wheel group is
allowed to to run any script wiht runscript.sh as root.

 %wheel ALL=(ALL)NOPASSWD: /etc/init.d/cupsd restart
 
 when I try with my normal acount I get
 [EMAIL PROTECTED] ~ $ /etc/init.d/cupsd restart
 * /sbin/runscript.sh: must be root to run init scripts
But you have to start the cupsd script with sudo:
$ sudo /etc/init.d/cupsd restart

At least this is how I know sudo.
- --
wabu


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFdCgfBbWbHb9PeLsRAn2eAKCDoJ0WS0Ji29u8bfWMfkXPLBIWVwCeO11w
E9tcCK5q+LcwE4vVX9JteWg=
=K6aG
-END PGP SIGNATURE-
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] SUDO: running /etc/init.d/cupsd restart

2006-12-04 Thread jak gentoo

On 12/4/06, Daniel Waeber [EMAIL PROTECTED] wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

jak gentoo wrote:
 Hi all,

 I'm trying to allow users in the wheel group to run /etc/init.d/cupsd
 restart
 I edited /etc/sudoers with visudo to the following but it doesn't work,
any
 ideas?

 %wheel ALL=(ALL)NOPASSWD: /sbin/runscript.sh
You won't need the line above, it would be a risk if wheel group is
allowed to to run any script wiht runscript.sh as root.

 %wheel ALL=(ALL)NOPASSWD: /etc/init.d/cupsd restart

 when I try with my normal acount I get
 [EMAIL PROTECTED] ~ $ /etc/init.d/cupsd restart
 * /sbin/runscript.sh: must be root to run init scripts
But you have to start the cupsd script with sudo:
$ sudo /etc/init.d/cupsd restart

At least this is how I know sudo.
- --
wabu


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFdCgfBbWbHb9PeLsRAn2eAKCDoJ0WS0Ji29u8bfWMfkXPLBIWVwCeO11w
E9tcCK5q+LcwE4vVX9JteWg=
=K6aG
-END PGP SIGNATURE-
--
gentoo-user@gentoo.org mailing list

thanks to both of you, I was to stupid to add sudo in front.

its running now.

jakommo