On 2014-06-10 15:12, Ken Schneider - openSUSE wrote:
On 06/09/2014 01:29 PM, Anton Aylward pecked at the keyboard and wrote:
On 06/09/2014 12:47 PM, lynn wrote:
13.1 Hi Why can't I run commands as sudo? e.g. lynn@catral:~> sudo automount -m root's password: sudo: automount: command not found
...
Probably. Sounds like a PATH problem to me.
When you do a real 'su' you get root's PATH
Not correct. you must use 'su -' to get root's $PATH.
Wait, there is a common confusion here. When you do "sudo automount" as above, it is searched not as root, but as the user that started sudo, ie "lynn", and "lynn" does not have automount in the path. That's the reason of the error message. It does not matter what path or powers you get after "sudo", root or not. However, IMHO it is a bug or bad programming that when you call "sudo something" it first ask you for the password, then tries to find the program, using the calling user's path. It could have bailed out without wasting the user time asking for the password. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)