当通过终端键入sudo命令然后显示错误时,如何解决此问题
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
当通过终端键入sudo命令然后显示错误时,如何解决此问题
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Answers:
将所有者更改回root:
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
或使用visudo
命令来确保文件的一般正确性(由于@KasiyA):
pkexec visudo
pkexec visudo