1、普通用户运行sudo,报错如下:
$ sudo sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
2、解决方法
2、使用root账户chown修改sudo权限
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
3、普通用户再运行sudo,还有可能报错:
$ sudo sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins
4、解决办法
chmod 644 /usr/lib/sudo/sudoers.so chown -R root /usr/lib/sudo
转载请注明:零五宝典 » Ubuntu执行sudo报错: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set