Cannot login via Unity login screen after upgrade to 12.04

Solution 1:

I've changed the display manager from the default LightDM to GDM by installing latter via sudo apt-get install gdm. With GDM set as new display manager (execute sudo dpkg-reconfigure gdm if you couldn't set GDM as display manager during installation), I could log in via the old-school graphical login screen it presented me with after a reboot.

Once logged in, I reset my display manager to LightDM by executing sudo dpkg-reconfigure lightdm. After another reboot, things were back to normal: I can log in via the distribution's standard login UI, now.

Solution 2:

Check after 12.04 upgrade: can't log in although password is correct. At the bottom of question you'll see:

sudo rm /home/<username>/.Xauthority*
sudo apt-get install --reinstall xorg
sudo reboot

That worked perfectly to me.

Solution 3:

This is weird.

I've been running 12.04 for awhile now (a few months) without issue. I haven't logged into the GUI in awhile (I typically shell in or use Webmin). Today, I tried to log into the machine via the GUI with my non-root account, it acts like it's trying to load up the desktop then bounces me back. I'm able to shell into the account without issue.

I created a new account and I can log in via the GUI, but the old account still doesn't work.

I stopped lightdm and started gdm and I was able to gain access into my old account via the GUI.

lightdm is probably choking on something...I've no idea what, since the account home directory of the old account is pretty empty, with the acception of hidden files. I suspect that lightdm is choking on a hidden file.

I was just going to leave it alone and continue to use gdm, but looked at the above possible solution.

Ran sudo rm /home/username/.Xauthority* and didn't reinstall xorg. I stopped gdm and started lightdm. Then I attempted to log into the old account again...with success!

Solution 4:

sudo useradd -m username1
sudo passwd -m username1

This reset everything back to where I could log in again.