This question already has an answer here:
I was reading some blog and I found that I can manually start GUI by issuing this command
sudo startx, so I did that. I did it in the terminal with the GUI already running. Now I'm unable to login to my user account.
Before that my PC used to boot straight into my account without asking for the password (without even showing the GRUB menu since I have only Ubuntu 12.04 installed on my PC). But now it boots and lands in a screen (without showing the GRUB menu) which displays my user account along with the Guest account. When I choose my account, it asks for the password. I entered the password but it comes back again to the same screen without any response. I am damn sure that the password that I entered was right. When I choose the Guest account, everything goes well. Now I have access only to the Guest account.
Before posting this question, I read similar questions posted here:
and I tried solutions suggested for them but nothing worked.
This page (https://help.ubuntu.com/community/LostPassword) and this page (https://wiki.ubuntu.com/RecoveryMode) seems to provide some solutions but I could not bring up the GRUB menu by pressing the SHIFT key or the ESC key. While booting, I kept pressing the keys (I tried both the keys separately) but it would land straight onto the screen displaying user accounts.
I logged into the Guest user and changed my administrator account to standard one. I have no way to know what the root password is.
I opened the Terminal in the Guest account and entered
sudo passwd root. It returned the following:
sudo: unable to change sudoers gid: Operation not permitted sudo: setresuid() [0, 0, 0] -> [128, -1, -1]: Operation not permitted
Now I can not access any of my files or folders. Are there any possible solutions to my problem without re-installing the OS? Is there any way to reset all the User accounts and regain access to my account?