This is for an Ubuntu 15.04 on a laptop (Dell inspiron 3135).
Somehow the capability to use
sudo got lost, and, probably relatedly, I can no longer log in at the lock screen. There is no problem logging in after a reboot. But I can no longer make software updates if they require root privilege; when trying to authenticate with my user password the dialog window "shakes its head" and the request is denied. So I have to cancel software updates.
Here is what I've tried so far:
Since I obviously can't use
sudo for anything I booted the system up in recovery mode and used the
<drop to root shell> menu item. Then I get a prompt
I then mount the
/ partition using
mount -o rw,remount /
And then tried first (let's just say my login is wuzzle)
usermod -a -G sudo wuzzle
Then rebooted, logged on and find that I still couldn't use
Next I tried, after the same procedure as above,
adduser wuzzle sudo
This command, as the previous one, was accepted without response.
Yet, after reboot and login I still can't
sudo. For example:
ls -l /etc/sudoers
shows it has this ownership
-r--r------1 root root
cd /etc/; more sudoers
sudoers permission denied
$ sudo more sudoers [sudo]password for wuzzle: (password entered) Sorry, try again.
Also, the date of the file
/etc/sudoers indicates that it was unchanged even though I used before commands (as root) that I had expected should change the file.
Now I'm out of ideas. I tried to find a solution by searching and browsing around but it appears that everything written about similar problems always gives advice using commands that require
sudo. So it's all catch 22.
I also tried to use the same commands again (from the root shell in recovery mode):
> adduser wuzzle sudo The user wuzzle is already a member of `sudo`.
But that's not true.