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

痴心易碎 提交于 2019-12-12 03:48:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!