Help With Path Not Working.

Michael Whittaker (QAC) Michael.Whittaker at pac.ericsson.se
Mon Mar 11 05:57:42 EST 2002


Hi

I have a requirement from my users so that they do not have to type in the absolute path for every command when running sudo. The problem occurs when some commands exist in 2 directories and both directories are in the path.

Example

PATH=/usr/bin:/sbin:/usr/local/bin

/etc/sudoers
Cmnd_Alias      ARP_COMMANDS = /sbin/arp
Cmnd_Alias      CHOWN_COMMANDS = /sbin/chown
fred         	ALL = ARP_COMMANDS, CHOWN_COMMANDS

Results:
sudo arp -a 
works correctly. arp command is picked up from /sbin

sudo chown root /tmp/m1
Sorry, user fred is not allowed to execute '/usr/bin/chown root /tmp/m1' as root on disney

This occurs when chown is in /sbin and /usr/bin

The problem is that I need /sbin in the path in order to execute the arp -a without specifying the full path of command.

Can anyone tell me what I'm doing wrong ?

Regards - Mike



More information about the sudo-users mailing list