Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/sudo must be owned by uid 0 and have the setuid bit set version .ubantu14.04 LTS

Tags:

sudo

ubuntu

chown

when I set the EACCESS for npm and I was ran the chown command in my terminal for change owner permission but now i stuck in this sudo :" /usr/bin/sudo must be owned by uid 0 and have the setuid bit set" my version is : ubuntu14.04 LTS please help me guyz :)

like image 384
Chirag thaker Avatar asked May 03 '16 12:05

Chirag thaker


People also ask

How do I fix sudo usr bin sudo must be owned by uid 0 and have the setuid bit set?

Unfortunately /usr/bin/sudo is not owned by root and breaks as a result. To fix the problem I booted into recovery mode which provides a scroll down menu with an option to drop down to a root shell. This solved my problems once I logged back in as a user.

Does sudo use setuid?

The key is that sudo is a setuid binary – this means that it gets run as the user that owns it instead of the current user. This is what gives sudo its power. Because sudo is owned by root , the program is run as root.


1 Answers

First restart your pc, and press the ESC key while Ubuntu is booting.

This will bring you up the boot menu.

Select Advanced Options.

Select your OS version in (recovery mode), and press Enter Key.

It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.

It will load a command line at the bottom of the screen.

Now run each of the following commands.

mount -o remount,rw /
mount --all
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
shutdown -r now
like image 113
Abhi Avatar answered Oct 05 '22 06:10

Abhi