Thursday, March 05, 2009

Sudo error: sudo: must be setuid root

Here is a solution to a common error when using sudo

momouser> sudo -l
sudo: must be setuid root
momouser>

To fix the error above chown and chmod the sudo file as root, in my case the file is in /usr/bin

root>chown root:root /usr/bin/sudo
root>chmod 4111 /usr/bin/sudo

That should fix the error and you should be able to sudo without a problem.


Tech Blog's Quick List of other how to below:

4 comments:

Anonymous said...

Thank You
Thank You
Tahnk You

Hirak Barman said...

But it didn't work.
Still an error.

chown: changing ownership of `usr/bin/sudo': Operation not permitted

Genius24k said...

@Hirak Barman - I think your missing a / when you did the chown should be /usr/bin/sudo

shahmeer said...

hmmm its work for me. one thing i realized here is that, for this you should be there in root mod if not will not work. for that you will have to reboot your system and press the R to recover from recovery console,

ls -l usr/bin/sudo

then put the commands

chown root:root /usr/bin/sudo
then
chmod 4755 /usr/bin/sudo
then typed

reboot

For suggestion and concerns E-mail