Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu dont let me login in a graphic session. I type the password (it detects if it's wrong) and even typing it wright the system take me again to login screen.

I've found this other question and run the pastebin command, getting this URL:


I've also checked my Home permissions, it's rwx for the owner (me :D)


EDIT: when I login in tty1, bash returns an error mensage in the file /etc/profile. Ubuntu had an old copy of this file, so when I use the old copy, it works just fine. Only problem, the upper and left bars (with programs, open things, etc.) didnt show up. I'll try get these back later

share|improve this question

4 Answers 4

A lot of people call out permissions on .Xauthority as being the culprit here, but it can be other files, too. I had this problem, and fixing .Xauthority was not enough.

Login as the user (Ctrl-Alt-F1), then do:

cd ~

sudo chown -R username:username .* *

(note: including .* since * won't pick up hidden files)

If that doesn't work, I think you can safely rule out your manifestation of this issue as being permissions-based.

Another thing to try is logging in as a guest. If that doesn't work, nothing you do to a user's home directory will make any difference.

share|improve this answer

I had this problem, and I pulled out the shotgun. I had another sudo enabled account that I logged into. I found that I could 'su' to the affected account, so terminal mode was fine. BUT, I wanted it fixed now, so:

I moved all files out of the home directory of the bad account to /home/store (store was JUST a directory, NOT a home directory for a user).

Make sure to do TWO 'mv' commands. 1} sudo mv /home/bad_account/* /home/store, and 2) sudo mv /home/bad_account/.* /home/store.

Was on Ubuntu, so I then ran sudo deluser bad_account

Then sudo adduser bad_account

Then sudo mv /home/store/* /home/bad_account, and sudo mv /home/store/.*

Then finally sudo chown -R bad_account:bad_account /home/bad_account

bad_account == good_account now.

share|improve this answer

If the problem is due your Display Manager (DM) this would fix it:

Log-in to a new tty (press ctrl + alt + F1) and enter the commands;

sudo stop lightdm
sudo dpkg-reconfigure lightdm 

then choose gdm as the default DM. After having done that, restart the system to see gdm in effect using command:

sudo reboot

But if want lightdm back, open a terminal and enter:

sudo apt-get install lightdm

Then go to a tty (press ctrl + alt + F1) and enter the following:

sudo stop gdm
sudo dpkg-reconfigure gdm

and choose lightdm to be your default display manager. Restart the system with:

sudo reboot
share|improve this answer
Guess it's not an problem with Display Manager. lightdm and gdm both dont allow login :( –  Paulo Nesello Dec 7 '13 at 13:50

I don't know, would it create any security problem but using this command can solve your problem

sudo chown 777 .Xauthority

share|improve this answer
or better use this 'sudo chown youruser:yourgroup ~/.Xauthority' –  g_p Dec 6 '13 at 16:00
Not an permission problem. .Xauthority is already owned by my user. :( thx –  Paulo Nesello Dec 7 '13 at 13:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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