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?

3
  • This isn't really a pogramming question.
    – PeeHaa
    May 1, 2012 at 18:22
  • you don't have the root password?
    – Chris2048
    May 1, 2012 at 21:28
  • @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. May 2, 2012 at 3:30

2 Answers 2

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.

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

You must log in to answer this question.