Ubuntu 20.04 - Can’t log in after upgrade

I installed 20.04 (upgraded from 18.04) and cannot log in at all. I’ve tried changing my password using recovery mode, installing lightdm, and using Ctrl-Alt-F3.

Strangely, when using Ctrl-Alt-F3, I can log in as root, but not into my personal account. Even after I change the password to my personal account using the command line in recovery mode, I can’t log in to my personal account. I can log in to root just fine.

I had a yubikey I would login with on 18.04, maybe that’s what’s wrong? I checked the pam.d files and they seem to have reverted back to their original state (I had to edit them to get the yubikey to work).

I am stuck and could use some help, thanks in advance!


Weird. Same problem, but Ctrl+Alt+F4 changed it to my logged-in desktop


Suggesting more potential solutions.

Try logging in via the text console (CTRL+ALT+F1) which tries to do fewer things than the graphical login. If you cannot login via the text console, then the problem might be an actual password typo or a keyboard layout issue. If you need to change your password, reboot into recovery mode in the grub menu, choose "drop to root shell", and run passwd myuser.

If your text console login works, but you can't login via the graphical interface:

  • Be mindful of the keyboard layout active when you enter your password. you can change the default layout of the linux console by following steps in https://superuser.com/a/404507/525084 .
  • If you've reused your /home directory from a previous installation, and you changed your password in the new install, you won't be able to mount any encrypted home filesystem and the graphical desktop will boot you out right away. If you use an encrypted /home, you'll have to re-wrap your ecryptfs configuration to recognize the new password (see how to change password of an enrypted ubuntu user account?).

I once or twice had problems logging in with my account. Removing/renaming one of the (desktop?) configuration settings solved the problem. I can't remember exactly and I can't check right now, but I think it was the ~/.config/lxsession folder.