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
visudo
command to ensure general correctness of the files:
pkexec visudo