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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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 (thanks to @KasiyA):