Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com May 1 '12 at 18:26

This question came from our site for professional and enthusiast programmers.

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

2 Answers 2

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.