0

I managed to delete my only user from sudoers group, and now I can't do any administrative tasks anymore. I have been looking for an answer hours, and I guess that part of the problem is solved. But the real problem is that I can't access GRUB, where I could choose recovery mode. I have read many topics about the same problem, but no answer has worked for me.

When I try to access GRUB hitting/holding shift, nothing related to GRUB emerges. The same goes with ESC. What is more, after that I get a blue box saying "Default boot missing or boot failed. Insert recovery Media and hit any key. Then select 'boot manager' to choose a new boot device or to boot recovery media". After that it takes me to boot option menu. I have an option there "Unknown Device" which is supposed to be my hard drive. When I choose it, it takes me back to my login screen.

So what is wrong with this? It takes me through this same path even without pressing any button during start up.

I installed this Linux Ubuntu 14.04 LTS via USB device Acer Aspire E5-573G Intel Core i5-4210U NVIDIA GeForce 940M 256 GB SSD

jiipeezz
  • 1,256
  • this has nothing to do with how to boot into the recovery as the link suggests. This has to do with him not having sudo access – John Orion May 05 '16 at 17:48
  • 1
    @JohnOrion no, we need "recovery" to be able to reset the administrative password. – guntbert May 05 '16 at 18:47
  • I may have worded it incorrectly but ... this is a much different situation from what the link is and not a Dupe .. this poster has issues with sudo GRUB and possibly hd corruption. That post is just a basic on how to boot to recovery and the OP seems to already understand how but the process isn't working – John Orion May 05 '16 at 19:02
  • @JohnOrion: OP has actually two unrelated problems: 1) no administrative account and 2) single-user/recovery mode doesn't work. I think they should be addressed individually but 2) should be first in line since it's necessary to solve 1). – David Foerster May 06 '16 at 13:17

1 Answers1

0

you may have several issues but here is how you may solve one of them

Boot to the live cd and select try Once booted go to a terminal and type sudo su Now you should be in root access.. On the desktop you should see an icon for your drive Right click that icon and choose mount. Then click on it to open it. Once open navigate to the /etc/sudoers.d folder Once there highlight the long path to the folder and copy it Go back to the root terminal and type

cd <right click and paste in that long path line> 

It should look something like this

cd /media/xubuntu/4272e2f1-d9ef-fc67-9f9a-57272d01e705/etc/sudoers.d/

press enter and you should be in the sudoers.d folder

type touch <username> where username is the name of the user you want to have sudo

then type

mousepad <username> again where the username is the account you want to have access to sudo

In mousepad add the following line

%<username> ALL=(ALL:ALL) ALL 

of course substituting <username> so if the username was joe it would read %joe ALL=(ALL:ALL) ALL

If you want to be able to use sudo without having to type the password every time you can use this line instead

%<username> ALL=(ALL) NOPASSWD: ALL

This will not add or change the password of the user though so if you deleted the password for the user then this will not work because sudo will not accept a blank password.

save the file and when you reboot into your normal Ubuntu .. the user you added should have sudo privileges again

John Orion
  • 2,801
  • I followed your instructions exactly, and they worked for me perfectly! Now I have my account in sudoers file again. You saved my day, thanks! – jiipeezz May 06 '16 at 13:25