1

How do I get my user back on the sudoers list? I've tried How do I add myself back as a sudo user? but with the left SHIFT key pressed all the way from the moment the reboot is pressed until the end, but it is not working.

I'm using Ubuntu 16.04.2 LTS, on a DELL E7440. This uses EFI (not sure whether this makes any difference at all).

The last option is reinstalling my system from scratch, which I'm avoiding.

Zanna
  • 70,465
Feng
  • 81

2 Answers2

1

Immediately after the motherboard / computer manufacturer logo splash screen appears when the computer is booting, with BIOS, quickly press and hold the Shift key, which will bring up a GNU GRUB menu screen. With UEFI press (perhaps several times) the Esc key to get to the GNU GRUB menu screen. Sometimes the manufacturer's splash screen is a part of the Windows bootloader, so when you power up the machine it goes straight to the GNU GRUB menu screen, and then pressing Shift is unnecessary.

Then follow the instructions from How do I add myself back as a sudo user? as you tried to do before.

karel
  • 114,770
1

I ended with an alternate workaround (this route has worked in the past; I had to open my ol' bag o' tricks; it surely has been closed for a decade...):

  1. Burn an Ubuntu install image (I used the ubuntu-16.04.1-desktop-amd64.iso). I had to use a Windows box to burn the image (on Ubuntu, it requires root permission).
  2. Right after the manufacturer logo, hit F12 (to trigger the 'one-time boot configs'). I had to turn on the 'legacy mode' and redo this step once more in order to show up the 'boot from USB storage' option).
  3. At the initial screen, select 'try Ubuntu' and wait for it finishes loading.
  4. Opened the Nautilus file manager (Super-2).
  5. Browsed to my local HD, and inside it, the 'etc' folder.
  6. Opened a terminal there (right-click, and select the option 'open a terminal there')
  7. In the terminal:

    sudo vi group
    
  8. Searched for the sudo

    sudo:x:27:
    
  9. Appended my user login.

    sudo:x:27:*my-login*
    
  10. Save the file!

And that's all! After rebooting normally, I was able to 'sudo' again!

muru
  • 197,895
  • 55
  • 485
  • 740
Feng
  • 81