[sudo-users] syntax for running a command with options

Ladner, Eric (Eric.Ladner) Eric.Ladner at chevron.com
Mon Apr 30 09:03:56 EDT 2007

> rsoft ALL = (root) NOPASSWD: /etc/init.d/cruisecontrol restart

That should work.  If I'm not mistaken, the sudo matches the command
path expansion) and it has to match exactly if there are no wildcards...

Eric Ladner
Systems Analyst

-----Original Message-----
From: sudo-users-bounces at courtesan.com
[mailto:sudo-users-bounces at courtesan.com] On Behalf Of Paul Pianta
Sent: Friday, April 27, 2007 12:03 PM
To: sudo-users at sudo.ws
Subject: [sudo-users] syntax for running a command with options

Hi All

Is it possible to supply arguments to a particular command?

rsoft ALL = (root) NOPASSWD: /sbin/service cruisecontrol restart

I know I should be giving permission on /etc/init.d/cruisecontrol but
there is a script that uses the /sbin/service command instead.

And anyway - even if I did set the permissions on the initscript itself
- how could I limit it to just 'restart'?

rsoft ALL = (root) NOPASSWD: /etc/init.d/cruisecontrol restart


sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:

More information about the sudo-users mailing list