sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set的解决办法

不知道为什么ubuntu中无法直接sudo+命令了。。。报错:sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set。只能su切换到root后再执行命令。

解决办法:

  1、切换到root

  2、chown root:root /usr/bin/sudo

  3、chmod 4755 /usr/bin/sudo

  以上步骤可以重置sudo的属性。

如果不知道root密码,参考:https://zhuanlan.zhihu.com/p/75264313

原文地址:https://www.cnblogs.com/jiangyu0331/p/14341232.html