Sunday, June 22, 2008

sudo: must be setuid root solved in Ubuntu

Go to recovery console (reboot, and chose recovery console in case you didn't catch on to how to do that),

fire following commands .


Code:
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
and reboot the machine by

Code:
shutdown -r now


In case if you are getting a "Sudo: /etc/sudoers is mode 0777, should be 0440" message on startup then

go to recovery console and fire following command

Code:
chmod 0440 /etc/sudoers

-Mihir Patel

14 comments:

Anonymous said...

Thanks :):):)

Unknown said...

How do you get to recovery console I'm Running Ubuntu Server 10

Anonymous said...

did not have this problem with gutsy. Works fine now, :)

Anonymous said...

Did not have this problem with gutsy. Works fine now. :)

Unknown said...

It says me Permission denied.
for the both the above comments.

Mihir said...

ishita,

just use sudo in front of the command, in linux when you user this it means "Super user do" in short "do what i tell you i am administrator".

Anonymous said...

when i type sudo i get this problem so how can i get the permission to execute this command

Mihir said...

what problem do you get ?

Anonymous said...

I still see the same message --
sudo: must be setuid root

Anonymous said...

Thankyou so much!!!! I had about 3 months of work on this computer, you just saved me my job. Thankyou from USA.
-open source

Francisco Vieira said...

If you're getting the Permission denied that's because you are trying to execute the commands as a normal user (not administrator). Normally you would use sudo to execute the commands as administrator but sudo is broken, so you have two choices:
- go to the recovery console where you'll boot as root and therefore have permissions to modify sudo
- boot from a live cd and mount the partition where your sudo file is, and now you can run the commands over that sudo file using the not broken sudo from the live cd

Mihir said...

Thanks for adding the info(Under bonet working)

Unknown said...

how to move to recovery console please let me know

crazy techy said...

hey man can you read this please let me know steps of this.

recovery console

how can i?
i am new to ubuntu?