[sudo-users] Using wild cards in a command path

Eric Bradley ebradley4 at csc.com
Tue Jul 29 09:46:50 EDT 2008


I've tried that and it returns the correct thing
 
(root) NOPASSWD: /opt/networker/bin/*     which doesn't work - get user is 
not allowed to execute the command as root

If I change the sudoers file to /opt/networker/bin/tempo.sh I can run 
tempo.sh as root just fine. So the absolute path including the name of the 
command at the end works, but the absolute path with a * at the end 
doesn't.

The sudoers man page suggests the /opt/networker/bin/* and 
/opt/networker/bin should both work to let me run commands that reside in 
/opt/networker/bin.

Not sure what I'm doin wrong.

Thanks,
Ric Bradley






Russell Van Tassell <russell+sudo-users at loosenut.com> 
07/28/2008 05:58 PM

To
Eric Bradley/GIS/CSC at CSC
cc
"Carville, Stephen" <scarville at LANDAM.com>, sudo-users at sudo.ws
Subject
Re: [sudo-users] Using wild cards in a command path






On Mon, Jul 28, 2008 at 03:51:10PM -0500, Eric Bradley wrote:
> Stephen,
> I tried what you suggested and got the same results. Any other 
> suggestions?

It's often helpful to try "sudo -l" to see what commands sudo thinks can
be run (ie. how the sudoers file is being parsed) to make sure you're
getting back a reasonable list.

-- 
Russell M. Van Tassell
russell at loosenut.com

"'Kung Fu' means skill from effort. 'Kung Foo' means skill from
  badass-programming-powers..."




More information about the sudo-users mailing list