Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In ubuntu 11.04 I seem to have messed up the permissions/ownership of the /usr/ directory. It won't let me sudo -s to fix them!

sudo: must be setuid root

and I can't login as root because I'm on ubuntu and don't know the password. Does anybody have any advise? I also can't change the boot menu for the same reason.

share|improve this question
up vote 2 down vote accepted

Boot from a live CD and then either:

  • mount the root partition and ad setuid to sudo binary

mount /dev/sdxx /mnt
chmod +s /mnt/usr/bin/sudo
  • mount the root partition, chroot and change root password

mount /dev/sdxx /mnt
mount --bind /dev/ /mnt/dev/
chroot /mnt

Where /dev/sdxx is your root partition

share|improve this answer
Its the best answer but not quite what I wanted. Moral= always set the root password! – Mikhail Jul 20 '11 at 2:52
And/or, moral: don't mess with /usr. – tripleee Oct 31 '14 at 11:37
If you have run a stray chmod -R whatever then the only sane way to recover is to restore from backups or reinstall your system. Otherwise, you will be mired with lost or insecure privileges for quite some time to come. – tripleee Oct 31 '14 at 11:41

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.