Bugzilla – Bug 205
Sudo 1.6.7p5 (SuSE 9.2): "command not found"
Last modified: 2007-06-19 13:04:51 MDT
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.
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.
Almost certainly a PATH issue, marking as invalid.