The problem probably is that the sudo
you are running is probably different from the system's sudo
.
This is (probably) a user configuration.
FIRST: Check if using /usr/bin/sudo
works ok, to test that hipotesis.
IF IT DOES: Then either you are using another binary, or an alias
USING ANOTHER BINARY: Users can make different versions of system binaries to use (usually, they are just scripts). To check for that possibility, run which sudo
. This will tell you the location of the sudo
you are running. IF it says /usr/bin/sudo, then we exclude this possibility. If something else, that is probably the problem
USING AN ALIAS: an alias is a lightweight way to personalize commands. Instead of writing a binary, you make a small alteration, such as adding an option. This is done in configuration scripts for BASH, the program that reads the commands.
To check for that, type alias
and see if sudo appears on the list. If it does, then this is probably the problem. Use find ~/ -maxdepth 1 -size -20k -exec grep -H 'alias sudo.*' {} \;
to find the file that is setting up the alias (Some common guesses would be: ~/.bashrc ; ~/.bash_profile ; ~/.bash_login and ~/.profile ).
If you cant find the file, use find ~/ -size -20k -exec grep -H 'alias sudo.*' {} \;
instead, to look at all of your user's files. (this will take a long time)
which sudo
– josinalvo Sep 02 '12 at 00:40alias sudo='sudo env PATH=$PATH'
. However, the alias is not in ~/.bashrc, ~/.profile, /root/.bashrc or /root/.profile. Any ideas? – Peter Becich Sep 02 '12 at 00:50find ~/ -size -20k -exec grep -H 'alias sudo.*' {} \;
; removed the line and it works. Thanks! – Peter Becich Sep 02 '12 at 01:45