1.问题提出
When I type a sudo command into the terminal it shows the following error:
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
How do I fix this?
2. 解决办法
- Change the owner back to root:
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
- Or use the
visudocommand to ensure general correctness of the files:
pkexec visudo
3. respect

当尝试使用sudo命令时,如果遇到错误提示`sudo:/etc/sudoers is owned by uid 1000, should be 0`和`sudo:no valid sudoers sources found, quitting`,这表明sudoers文件所有者不正确。解决方法包括使用`pkexec chown root:root /etc/sudoers /etc/sudoers.d -R`来将文件所有者改回root,或者通过`pkexec visudo`检查和修正sudoers文件的正确性。
1447

被折叠的 条评论
为什么被折叠?



