Error 1
/etc/sudoers: syntax error near line 26 <<< sudo: parse error in /etc/sudoers near line 26 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin
Solution 1A
Edit:
On your terminal type:
pkexec nano /etc/sudoersIt will open the file and you can edit now. To save and exit the file, just press:
Ctrl+XAnd it will ask you if you wanna save the file. So type:
Yand >Enter. Done!!!Solution 1B
we have to write -
pkexec visudoAnd it will open the file and one need to change as previous if any made.
Then type Ctrl+X which will ask to save the file. So type: Y and Enter
Error 2
sudo: error in /etc/sudo.conf, line 0 while loading plugin 'sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must only be writable by owner sudo: fatal error, unable to load plugins:~$ pkexec su Error executing command as another user: Not authorized This incident has been reported
Solution 2
$ su root #enter password $ chmod 644 /usr/lib/sudo/sudoers.so $ chown -R root /usr/lib/sudoIf not, you’ll have to startup in recovery mode, get write permission on your disk, and change the mode of that file. https://wiki.ubuntu.com/RecoveryMode
$ mount -o remount,rw / $ chmod 644 /usr/lib/sudo/sudoers.so
Source : https://askubuntu.com/questions/637432/sudo-comes-up-with-an-error-cannot-run-anything-as-root
If above solutions doesn’t work, reinstall !