sudo must be setuid root error and recovery mode requires root passwd?

0

When I try to execute sudo su, I receive the following message:

sudo: must be setuid root

When I try to reboot in recovery mode, it asks:

Enter root password for maintenance

I'm using Ubuntu 10.10. I can't do any tricks as mentioned in all other websites until and unless I get sudo working. How can I do that?

Harsh

Posted 2012-05-01T18:14:20.980

Reputation:

This isn't really a pogramming question. – PeeHaa – 2012-05-01T18:22:45.717

you don't have the root password? – Chris2048 – 2012-05-01T21:28:43.540

@Chris2048, Ubuntu systems generally do not have root passwords, as root logins are completely disabled. The sudo command is used to obtain root priviledges, and requires the executing user's password instead. – Darth Android – 2012-05-02T03:30:48.820

Answers

5

Somehow your sudo executable lost its right permissions. Start to maintenance mode (Ctrl+D), it should not ask you for a password, if there is none set, and run the following command:

chmod 4755 /usr/bin/sudo

If you can not enter maintenance mode, you can boot from a Live CD/USB stick and mount the according filesystem and then run the chmod command.

harry

Posted 2012-05-01T18:14:20.980

Reputation: 51

0

You can try the other way: https://help.ubuntu.com/community/LostPassword

If the "Standard Way" does not work for you and you recieve the "Give root password for maintenance" message, you can recover your password using the following steps

  1. Reboot your computer

  2. Press Shift or Esc at the grub prompt (as earlier).

  3. Select your image.

  4. Highlight the line that begins kernel and press e to edit

  5. Go to the very end of the line, change the ro to rw and add init=/bin/bash

Press Enter, then press b to boot your system.

Your system will boot up to a passwordless root shell.

  1. Type in passwd username

  2. Set your password.

  3. Type in reboot

user118305

Posted 2012-05-01T18:14:20.980

Reputation: