Tuesday, June 1, 2010

sudo:must be setuid root

Previous: Installing Android development tools

As a noob, I do noobish things. Here's the latest.

Something went haywire with Firefox (probably because I deleted something inadvertently when I was getting rid of old files), and I restored /usr from my backup drive using rsync in an attempt to fix Firefox. Apparently, rsync changed the ownership of /usr to the userid under which it was executed. When I tried to run sudo, I got this:
sudo:must be setuid root
Browsing the net for advice, I found scattered, incomplete help for questions that were close to, but not quite the same as mine.

Basically, the solution is to change ownership back to root. Culling bits and pieces from different sources, here's what I ended up doing:

1. Rebooted and hit ESC at the prompt to get the grub menu.
2. Chose 'root console' from the grub menu.
3. Ran the following commands:
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
chmod 0440 /etc/sudoers
reboot
When the system came back up, everything was normal again.

Next: Border around images in OpenOffice Impress

5 comments:

  1. Thanks a lot ...It worked fine for me ....

    Well it was very tiring for me as we had some programs installed which could not be missed


    Aniket Gupte

    ReplyDelete
  2. chown: changing ownership of `/usr/bin/sudo': Operation not permitted

    chmod: changing permissions of `/usr/bin/sudo': Operation not permitted

    chmod: changing permissions of `/etc/sudoers': Operation not permitted


    thease type of error comes in my system when i entered thease command

    ReplyDelete
  3. please help me out................

    ReplyDelete
  4. I got this error
    chown: changing ownership of ‘/usr/bin/sudo’: Operation not permitted

    ReplyDelete