Recovering root access in Ubuntu
#3
(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 Wink

Code:
sudo:x:27:pfeerick
  Reply


Messages In This Thread
RE: Recovering root access in Ubuntu - by pfeerick - 07-26-2017, 05:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ubuntu server 20.04 request phi0x 2 5,286 12-30-2020, 08:02 PM
Last Post: phi0x
  SPI on ubuntu IlyaM 4 9,091 07-16-2018, 03:00 AM
Last Post: kingflab
  Ubuntu password not working joemassimino 4 8,514 05-18-2018, 03:33 PM
Last Post: Luke
  After flashing Ubuntu- how to get graphical desktop Partymack711 6 10,842 02-01-2018, 09:45 AM
Last Post: Partymack711
  (ARCHIVED) Ubuntu Xenial Image (BSP Kernel) longsleep 337 633,812 01-31-2018, 11:58 AM
Last Post: Luke
  PPTP doesnt work with ubuntu escovedo 2 8,660 08-23-2017, 09:28 AM
Last Post: gilbertotcc
Question HELP Ubuntu Mate password recovery procedure Captain Anni Hilator 5 9,912 08-03-2017, 03:52 PM
Last Post: Luke
  Ubuntu boot very slow with wifi driver remainder 9 20,657 08-03-2017, 07:23 AM
Last Post: victorssantos
  Pine64 2Gb Ubuntu Mono not updating and stuck petec 0 2,874 07-08-2017, 09:34 AM
Last Post: petec
  Ubuntu Xenial - Firefox add support for H264 and EAC3 klode 1 4,704 05-26-2017, 11:10 AM
Last Post: Gnx

Forum Jump:


Users browsing this thread: 1 Guest(s)