Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 6085  / 1 Year ago, sat, february 4, 2023, 2:01:30

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?


More From » boot

 Answers
6

  • 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).


[#30336] Monday, February 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anxietunnel

Total Points: 66
Total Questions: 120
Total Answers: 115

Location: Norway
Member since Sat, Mar 4, 2023
1 Year ago
;