How do I deal with 'sudoers.so must be only be writable by owner'?

Whenever I try to install or remove something using terminal it gives the following error message:

bluebird@bluebird:~$ sudo apt-get update
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
bluebird@bluebird:~$ sudo apt-get remove vlc
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
bluebird@bluebird:~$ sudo apt-get install apt-file
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
5

2 Answers

22h has it right, but because of the sudoers.so issue, you won't be able to run sudo to fix the permissions.

So you are going to have to drop to a root shell as described here: How do I boot into a root shell?

(Essentially rebooting, holding the left Shift key for Grub to come up, "Advanced Options" "recovery mode" "network" and "root").

Then you will need to:

chown root:root /usr/lib/sudo/sudoers.so
chmod 644 /usr/lib/sudo/sudoers.so

Which should solve this issue.

2

Try this,

ls -l /usr/lib/sudo/sudoers.so

If the first word of the output is something other than

-rwxr-xr-x

we have to remove the write permissions from group and others.

pkexec chmod go-w /usr/lib/sudo/sudoers.so
2

You Might Also Like