Tuesday, October 29, 2019

boot - Unable to log in and unable to reset the password




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:



My user ID and password is correct: can not log in to Ubuntu 12.04




Unable to log in to my account



Login fails after crash



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?




  • Reboot the system and hold down the SHIFT key before the system boots into Ubuntu.


  • Choose the Recovery Mode using Arrow keys and press ENTER.

  • Choose 'root' from the list that appears. It will bring up the command line interface.

  • Type rm ~/.Xauthority and hit ENTER.

  • Type rm -rf ~/.config/autostart and hit ENTER.

  • Type shutdown -r now to reboot the system.



What this does is that it just deletes a couple of configuration files (nothing to worry).


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...