Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

On a colleagues computer, everytime I use a sudo command, I get this error:

sudo: must be setuid root

I tried various things mentioned on the internet, like changing the permissions to 4755 from a live cd, but even this command from a live-cd

sudo chmod 4755 /media/device/usr/bin/sudo

gives the same error.

EDIT: The colleague told me that he executed this command, god knows why :/

sudo chmod -R 777 / or sudo chmod -R 777 He isnt exactly sure.

share|improve this question
Can you post the output of ls -l /usr/bin/sudo ? – karthick87 Jan 17 '11 at 6:57
I cant post it now, I changed the permissions, but it was rwxrwxrwx root:root 2 sudo – theTuxRacer Jan 17 '11 at 7:03
up vote 12 down vote accepted
  • Reboot the computer,choose recovery console and type the following commands

    chown root:root /usr/bin/sudo

    chmod 4755 /usr/bin/sudo

  • Reboot the machine.

  • Also have a look at this link for fixing broken sudo.

share|improve this answer
See how to Boot into recovery mode. – karthick87 Jan 17 '11 at 6:45
I was able to do this by logging in as root without the recovery console, if you have that available. – jocull Jan 2 '14 at 15:02

After executing sudo chmod -R 777 / I'd recommend to urgently reinstall the whole system from scratch. The command opens too much security holes, as any and every file on the system became readable (and writable!) by any user - including /etc/shadow, /etc/hosts, and even /usr/bin/sudo and /bin/ls themselves! Your system may look like a colander - every minute of using it means catastrophic risk and losses, especially when connected to the Internet. And fixed permissions to just sudo won't do anything at all.

Consider also this question.

share|improve this answer
yeah, I also cant mount usb-drives. – theTuxRacer Jan 17 '11 at 13:06
+1: system is totally screwed. – psusi Jan 17 '11 at 14:48

Once you fix the permissions on sudo, then use sudo along with the same method to recursively fix the permissions (same -R parameter used to screw up the whole system in the first place, only on both the chown AND chmod commands) on /etc, /boot, /sbin, /bin, /dev, /proc, /sys, and /usr. That should mitigate the security issues at least to the point where the system is usable.

Then again, a full reinstall would be easier should an attacker obtain control of your system (which they will if you're connected to the Internet at all while these permissions are being fixed), since it would be very difficult to take that control back otherwise.

share|improve this answer

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.