Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not login in Ubuntu 20.04 LTS [closed]

I have just upgraded my operating system Ubuntu 18.04 LTS to Ubuntu 20.04 LTS. But after installing completely, during login I couldn't login even with right password.I checked it was indeed a right password by entering username and password after pressing Ctrl + Alt + F2, I even changed the password from advanced recovery mode but still new password also doesn't work. For the right password the screen goes black for like a second then again comes back in the same purple login screen but with wrong password it says -sorry, that didn't work. please try again. I am new to Linux and any help is appreciated.

like image 696
Avisek SSarma Avatar asked Apr 26 '20 19:04

Avisek SSarma


People also ask

Why Ubuntu is not logging in after entering password?

Press Ctrl + Alt + F7 to get back to the login screen which should now look different. Does logging in work? If it does, your problem is solved! If it doesn't, go back to the fullscreen terminal (again, Ctrl + Alt + F2 ) and run sudo dpkg-reconfigure lightdm to set LightDM as you login manager again.

How do I fix the Ubuntu login loop?

Log in to the Shell When you get there, don't sign in. Instead, press Ctrl + Alt + F3 on your keyboard. Ubuntu will drop out of the graphical login screen and into a black and white terminal. Enter your username in the prompt, then provide your password when asked.

How do I fix Ubuntu 20.04 settings not opening?

On Ubuntu 20.04 settins won't open. This may be caused by some software install/update. To fix the error, i installed gnome-control-center package as the error suggests.

How to upgrade to Ubuntu 20 04?

Enter your Ubuntu user name along with the password which you are using so far. Now, simply first update and then run upgrade command: Now, this time when you try to login Ubuntu 20.04, you will be able to, successfully.

Why login screen loop occurs in Ubuntu 20 04?

In Ubuntu 20.04 the reason for this login screen loop can also be in conflicting environment variables setup ( $PATH ). In case PATH variable is assigned in several places simultaneously like:

How do I login to Ubuntu from command line?

For that press, CTRL+ALT+F3, this will drop you on the command line interface with login option. However, to exit Command line, you can use keyboard shortcut that is CTRL+ALT+F2, to get back the Graphical User Interface. Enter your Ubuntu user name along with the password which you are using so far.

How do I Turn on automatic login in Ubuntu?

Move on Parameter, users, and check the box for the automatic login (after unlocking). Reboot Ubuntu. In GRUB, select advanced options for Ubuntu, then recovery mode.


2 Answers

It's caused by ticking 'enable automatic logging in' at installation. Open the terminal by pressing Ctrl+Alt+T. Login, then enter

sudo nano /etc/gdm3/custom.conf

Change AutomaticLoginEnable from true to false, save the file, then reboot.

like image 143
loginbugfixubuntu2004 Avatar answered Oct 17 '22 08:10

loginbugfixubuntu2004


I think I have found the answer.It worked in my machine as this problem happened again.( But this works if you have more than one account with password known of superuser account and you want to login to another account with no superuser privileges where you could not login, else refer to @loginbugfixubuntu2004 's answer which could help.)

What I did was:

1.I pressed Ctrl + Alt + f3 ( you may do any f-keys from f2-f6 )

2.I login with a existing superuser account

3.You may make a home directory of "anotheruser" if no such home directory exists by:

$ sudo mkdir /home/anotheruser 

Then I copied the following files from superuser home directory to the home directory of that user where I could not login.

$ sudo cp .bashrc .profile .bash_logout /home/anotheruser
  $ cd /home/anotheruser
  $ sudo chown anotheruser: .
  $ sudo chown anotheruser: .bashrc .profile .bash_logout

5.then :

$ logout

6.reboot then hope it will work now

7.If again it does not work then like I tried changing password it may for you too.

8.Again press Ctrl + Alt + f3 ( or other fkeys as said above)

9.login as superuser

10.Change the password of "anotheruser" by:$ sudo passwd anotheruser

11.$ logout

  1. Reboot and hope it will work now.

Note: This problem may also arise if you make user by $ sudo useradd newuser. Don't do this instead use the adduser command.

like image 21
Avisek SSarma Avatar answered Oct 17 '22 06:10

Avisek SSarma