[sudo-users] Variable Argument in a command

mlh at zip.com.au mlh at zip.com.au
Wed Oct 13 07:07:16 EDT 2004


On Tue, 12 Oct 2004 09:39:27 -0500
"Ladner, Eric (Eric.Ladner)" <Eric.Ladner at chevrontexaco.com> wrote:

> 
> audit ALL = NOPASSWD: /usr/local/bin/ldsu [A-z][A-z]*
> 
> This should match exactly your requirement of "command
> any_one_word_without_space"

Just to be pedantic, that would restrict the command
to args of at least two chars.  Not that it would really
matter in this example.

This would seem to be enough:

 audit ALL = NOPASSWD: /usr/local/bin/ldsu [A-z]*

you might want to include numbers in case your users have
numbers, in which case you would probably would want
to have least two chars, the first always being alpha:

 audit ALL = NOPASSWD: /usr/local/bin/ldsu [A-z][A-z0-9]*


--
Matt



More information about the sudo-users mailing list