问题
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 :)
回答1:
Its beacuase of Permission issue
$ su
Password: <type your root password>
Switch to root user and run the command
# pkexec chmod a=rx,u+ws /usr/bin/sudo
Then check it by typing from the user
$sudo -l
it Works fine for me
Cheers....
回答2:
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
回答3:
Try this:
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
I've succeeded it
回答4:
/usr/bin/sudo mv /usr/local/bin/sudo{,2}
hash -r
Refer this https://unix.stackexchange.com/questions/419122/sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set?newreg=b2490740fb214ce79c316ad76f859e0a
来源:https://stackoverflow.com/questions/37003748/usr-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set-version-ubantu