 
                            You may have accedently changed the ownership of /etc/sudoers. You can check
with the ls command
ls -lrth /etc/sudoersIt should show the following, but in this it will not.
-r--r----- 1 root root 755 Jul  4  2017 /etc/sudoersIf you try to change the owner, back to root
chown root:root /etc/sudoersUnable to access /etc/sudoers
sudo: /etc/sudoers.d is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quittingIf you try to run the below command
Open two SSH sessions to the target server.
    echo $$    pkttyagent --process 29824Use the pid obtained from step 1.
    pkexec chown root:root  /etc/sudoer
    pkexec chown root:root /etc/sudoers /etc/sudoers.d -Rvisudo will start in the first session.In the below image, I have used Putty to make connections and logged in with the same user.
