Monday, March 23, 2009

Cannot use visudo?

Su is not always the best tool to grand permission to users, so I installed sudo on my Arch Linux system. However when I tried to issue visudo, I got the following error:

bash-3.2# visudo
bash: visudo: command not found
The reason of this is quite simple - /usr/sbin is not in the PATH environment variable by default, and you can locate the visudo command by:
bash-3.2# whereis visudo
visudo: /usr/sbin/visudo /usr/share/man/man8/visudo.8.gz
so just use the full path to visudo:
bash-3.2# /usr/sbin/visudo
then everything goes right.

No comments:

Post a Comment