Possible Duplicate:
Cannot login to my user account

This computer has had Ubuntu on it for quite some time, and after several upgrades, the OS started getting a little creaky. I decided to reinstall, but I wanted to keep my files, which was easy because /home was in a different partition.

During the installation, I chose to reformat my / partition, and use (but not format) my /home partition. I also ended up changing my password to something more secure. The install seemed to go OK, so I rebooted into the system.

I was presented with the new login screen, which I filled out and tried to log in. The screen flashed to black, sometimes showing a virtual terminal, and then put me back to the login screen. This happens regardless of whether I choose the "Ubuntu" or "Ubuntu 2D" session.

I switched to a virtual terminal and was able to login, but found my home directory empty, save two files telling me how to decrypt my drives. I ran the decryption command, and my files showed up. I assume because my password changed, this no longer happens automatically.

I'm running an ATI Radeon HD 5830 card on a 64-bit processor.

TL;DR:

  • I can no longer login to my computer.
  • My home directory no longer decrypts automatically.
link|improve this question
Can you login on the console? If so, try running a separate X using startx gnome-session-fallback -- :1 first. How specifically is your home directory encrypted? With that userspace encfs thing? -- The login problem might just be a stale .Xauthority. Delete them. Worked for me. (Just now.) – mario Oct 14 '11 at 21:39
That gives me a black screen. The drive is encrypted using eCryptFS, the default thing that comes with Ubuntu. – bluejeansummer Oct 14 '11 at 21:42
1  
Deleting the ~/.Xauthority worked. Mind turning that into an answer and explaining what it's for? – bluejeansummer Oct 14 '11 at 21:47
feedback

closed as exact duplicate by George Edison, htorque, Jorge Castro, Marco Ceppi Oct 18 '11 at 17:36

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

4 Answers

up vote 5 down vote accepted

The login problem might just be a stale .Xauthority file in your home directory. Login on the console using <Ctrl>-<Alt>-<F1>, and delete it and any variations:

 rm .Xauthority*

That's an authorization "cookie" used by the X server. I had the same after an update. No idea why it's not automatically cleaned up or overwritten. Possibly might have something to do with update changes due to lightdm. http://manpages.ubuntu.com/manpages/hardy/man7/Xsecurity.7.html

link|improve this answer
feedback

Same problem but I couldn't find a .Xauthority file in my system but when I listed my home directory

ls -l /home

the owner and group that was appearing were respectively 1002 and 1002. I just had to change the ownership with the real username

sudo chown -R myusername:myusername /home/myusername

and that solved the problem.

link|improve this answer
this is what I needed! please add your answer to askubuntu.com/questions/65852/cannot-login-to-my-user-account because this question has been closed as a duplicate – d3vid Oct 21 '11 at 8:00
feedback

Removing it (.Xauthority) on a fresh install with a previous encrypted /home worked for me.

I had the same issue with a different computer but same scenario (encrypted /home). This time it was an upgrade from 11.04 but I had the same error. I then change the owner/group to my user/group, as it was root.root, and that fixed the issue.

link|improve this answer
feedback

I had the EXACT same symptoms even after deleting all Xauthority files and purging gdm. I narrowed the problem down to my .profile file in my home folder. I had a bit of code in there for tab completion for Python pip, and I vaguely recall seeing occasional errors/tracebacks with 11.04 due to missing braces/brackets -- perhaps the line continuation '\' is causing problems? Anyhow, after more than 24 hours of digging around, I finally isolated the issue and can now reproduce the problem reliably. The bottom line is: 11.10 might not be as tolerant to errors in .profile code as 11.04. If in doubt, replace your .profile with the default version and see what happens.

dpaste code here

Pip Tab Completion

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.