So im stuck in a loop after do something stupid
i had a / in a sudo chown command due to my fat fingers, i CTRL-X the operation but not before /etc was changed to a non root user.
so now trying to run sudo i get the following
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialise policy plugin
trying to run the command
pkexec chown root:root -R /etc
doesnt work as this happens
ozhound@UbuntuServer:/$ pkexec chown root:root -R /etc
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/chown' as the super user
Authenticating as: ozhound,,, (ozhound)
Password:
polkit-agent-helper-1: error response to PolicyKit daemon:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.
I cannot login as root as i never enabled root
any suggestions? the other threads similar to this assume i have sudo access or the pkexec works.
ubuntu server 16.10
/mnt
and change the owner of/mnt/etc
to 'root` alias user #0. – sudodus Feb 18 '17 at 06:12