[sudo-users] Variable Argument in a command

Ladner, Eric (Eric.Ladner) Eric.Ladner at chevrontexaco.com
Tue Oct 12 10:39:27 EDT 2004

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

This should match exactly your requirement of "command

Eric Ladner, Systems Analyst 
RFMS IT Support

-----Original Message-----
From: sudo-users-bounces at courtesan.com
[mailto:sudo-users-bounces at courtesan.com] On Behalf Of Asif Iqbal
Sent: Monday, October 11, 2004 8:32 PM
To: sudo-users at sudo.ws
Subject: [sudo-users] Variable Argument in a command

Hi All

I have a command /usr/local/bin/ldsu <user> which gets all the ldap info
of a user. Per our policy only root can run this command. However a user
with correct sudo privilege is allowed to run it as well

But the problem is I can put this in the suders file

audit ALL = NOPASSWD: /usr/local/bin/ldsu testuser

and user audit can search for testuser. But I have thousand users. Is it
possible to come up with a sudo command that will allow audit user to
randomly query any user?

In other words I am looking for a sudoers line which conceptually looks
like this

audit ALL = NOPASSWD: /usr/local/bin/ldsu any_one_word_without_space

Thanks for the help

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
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