Professional Documents
Culture Documents
As you'll read on this answer on SO, this problem is not as hard as people are
making it. You can get the sudo command working again without a reinstall by
following these simple steps:
This does the trick and is much quicker and less painful than the "nuclear option"
recommended in other answers.
If your root password is not set, you can boot in Recovery Mode to set it.
Note that this will resolve the titular error /usr/bin/sudo must be owned by uid 0
and have the setuid bit set but if like the OP you did more than mess up the
permissions of the /usr/bin/sudo file, a more "nuclear" option may in fact make
more sense.
select root option in long list you can see after entering into recovery mode
(it is actually root shell)
type command - mount -o remount / (Or in recovery you can click on grub option.
This helped me get read-write permissions on the file system. This basically
updated the read/write mode on the file system since the command wasn't working for
me initially)
command - chown -R root:root /usr this command will change ownership from
"user" to root again recursively
now still i had problem with sudo command, so I again followed step 1,2,3 and
executed chmod 4755 /usr/bin/sudo
Now I really think that re-installing would have been really a "nuclear option"
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set. Below are
command that ive execute and reboot after.
Hope it helps.