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
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
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
where username is the name of the user you want to have sudo
then type
mousepad
again where the username is the account you want to have access to sudo
In mousepad add the following line
% ALL=(ALL:ALL) ALL
of course substituting
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
% 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
No comments:
Post a Comment