07-26-2017, 05:30 PM
(07-26-2017, 01:05 PM)Scientomancer Wrote: Yesterday I had cause to add the ubuntu user to the www-data group. I believe I did this:
Code:# usermod -G www-data ubuntu
Since then, I am unable to become root. If I try to sudo -i, I am told
Code:Sorry, user ubuntu is not allowed to execute '/bin/bash' as root on pine64.
Unfortunately, you haven't ADDED the ubuntu user to the www-data group, you've REPLACED the ubuntu primary user group with www-data, and consequently removed it from all other groups. For future reference, the command should have been -aG (yes, the a is important!). And because the root account is locked by default, unless you unlocked that, you can't log in as root to re-add ubuntu to the sudo group.
If you have another linux systen handy (or you can download VirtualBox and run a copy of ubuntu in a virtual machine, or make a bootable USB/CD), you could mount the ext4 partition, and edit /etc/groups, and re-add your username to the end. i.e. on my desktop, the sudo group line looks like this for the 'pfeerick' user. So just look for the sudo line, don't change the group number if it is different, and re-add ubuntu to the end. Then unmount, boot it back up, and see if it's fixed
Code:
sudo:x:27:pfeerick