[sudo-users] Difficulty with /sbin in PATH

Andreas Hasenack ahasenack at terra.com.br
Tue Feb 19 14:02:37 EST 2008

sudo-1.6.8p12-18.3 from SLES10 with the ldap patch (but I'm NOT using
ldap features here)

I'm trying to make this simple rule work without having to enter the
full path to the program:

andreas ALL=(ALL) NOPASSWD: /sbin/chkconfig ldap on

This works:
sudo /sbin/chkconfig ldap on

This doesn't:
sudo chkconfig ldap on

Sudo was built with --with-secure-path:

I confirmed with an "env" call that PATH does indeed include /sbin:
$ sudo env|grep ^PATH

I'm using env_reset in sudoers:
Defaults env_reset

So, why is a plain "chkconfig" not matching /sbin/chkconfig?
If I create a rule for some program in /usr/bin, then I don't need to
give the full path when running it with sudo... Strange.

More information about the sudo-users mailing list