Quantcast
Channel: Java mon amour
Viewing all articles
Browse latest Browse all 1124

sudoers command with any parameter

$
0
0
my /etc/sudoers file was configured with
%users ALL=NOPASSWD: /usr/local/bin/puppet agent -t
but then I was not allowed to run
sudo puppet agent -tv
and I get a
Sorry, user soa is not allowed to execute '/usr/local/bin/puppet agent -tv' as root on osb-vagrant.acme.com.
A good workaround is to use regexp:

%users ALL=NOPASSWD: /usr/local/bin/puppet agent -[a-z]*


Viewing all articles
Browse latest Browse all 1124

Trending Articles