Help With Path Not Working.

Brent Fortman Brent.Fortman at radioshack.com
Mon Mar 11 09:02:07 EST 2002


Why not simply change the path of "chown" in your sudoers definition to be:

CHOWN_COMMANDS = /usr/bin/chown

Brent


-----Original Message-----
From: Michael Whittaker (QAC) [mailto:Michael.Whittaker at pac.ericsson.se]
Sent: Monday, March 11, 2002 4:58 AM
To: 'sudo-users at sudo.ws'
Subject: Help With Path Not Working.


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
____________________________________________________________ 
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users



More information about the sudo-users mailing list