Allow user to run command with specific arguments

Bernard Fay <[email protected]>
Newsgroups gmane.comp.tools.sudo.user
Message-ID <CAH3AE4bKGLw2vW5h1DW6rS1CYYCXudiurxjOTia_FkTZtrjt2A@mail.gmail.com>
Hello,

I try to configure sudoers to allow a user to execute "/sbin/multipath -l"
and only the -l argument, none of the other arguments available to
multipath.

So far, I tried the following:

Cmnd_Alias      MPATHL    = /sbin/multipath -l
Cmnd_Alias      MPATHL    = /sbin/multipath -l, ! /sbin/multipath -[a-zA-Z]*
Cmnd_Alias      MPATHL    = /sbin/multipath -l, ! /sbin/multipath ""

and

%wheel ALL=(ALL) NOPASSWD: MPATHL

But none of the Cmnd_Alias tested gave the desired result.

How can this be achieved?
Thanks,
____________________________________________________________
sudo-users mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.