Bug 205

Summary: Sudo 1.6.7p5 (SuSE 9.2): "command not found"
Product: Sudo Reporter: Thore Schmechtig <guardian>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED INVALID    
Severity: normal    
Priority: normal    
Version: 1.6.7   
Hardware: PC   
OS: Linux   

Description Thore Schmechtig 2006-02-14 13:53:10 MST
This happens on one out of two machines I've tried sudo on so far. While on my
own PC it works fine (aside from one thing I'm considering to send in as an
extra bug report), on my wife's PC, same SuSE Linux version, same sudo version
and config (aside from differing user name and command list), sudo reports
"(command) not found".
Details:
I took the default sudoers file coming with my SuSE distro and set
"!authenticate", then I entered one line assigning exec rights to some commands
to one specific user on localhost as (ALL) users. On my wife's machine that line
reads:
"anari   localhost = (ALL) /sbin/ifconfig, /usr/sbin/sshd"

(One can tell that I wanted to enable her to start the ssh daemon when she has a
problem and I'm far away, so that I can help...)

However, when I start sudo with her account, like "sudo ifconfig", I get an
error message saying that sudo couldn't find the command! Needless to say that
"which (command)" as root returns the exact paths I entered above...

On my own machine, the default sudoers works fine, also with just
"!authenticate" and this line:

"tocis   localhost = (ALL) /bin/mount, /bin/umount, /sbin/dhcpcd -n"

When I enter "sudo mount ..." et cetera on my machine, all works well.
Comment 1 Michael Grubb 2006-05-31 14:25:42 MDT
This is more likely than not a PATH problem not a sudo problem.  Most Linux
distros/UNIX do not include the */sbin tree in the PATH of normal users. If the
anari account issues: 'sudo /usr/sbin/sshd'  what are your results?  If it works
then you either need to always specify the fully qualified path or add /usr/sbin
to the PATH.
Comment 2 Todd C. Miller 2007-06-19 13:04:51 MDT
Almost certainly a PATH issue, marking as invalid.