I'm getting the following error from sudo:
$ sudo ls sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin Of course I can't chown it back to root without using sudo. We don't have a password on the root account either.
I honestly don't know how the system got into this mess, but now it's up to me to resolve it.
Normally I would boot into recovery mode, but the system is remote and only accessible over a VPN while booted normally. For the same reason, booting from a live CD or USB stick is also impractical.
The system is Ubuntu 16.04 (beyond EOL, don't ask), but the question and answers are probably more general.