Fix Sudo Error: Cannot Run Anything as Root

command linelubunturootsudo

For some reason, when I try to run any programs (I am trying to run a rootkit hunter: rkhunter) as root on the command line with sudo like this:

sudo rkhunter

Then I get this message:

You must be the root user to run this program

and then I get these lines:

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

I try typing in just sudo but that comes up with the same three errors as above. Also in /etc/ sudo.conf does not exist.

I cannot run any other programs as root through sudo. It was also strange because I could run as root a day ago.
I would like it to work.

Just so you know, I am the only user of this computer, and the administrator, running Lubuntu 14.04.1.

Best Answer

If you can login as root:

$ su root     #enter password
$ chmod 644 /usr/lib/sudo/sudoers.so
$ chown -R root /usr/lib/sudo

If 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
Related Question