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

This question already has an answer here:

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:

http://paste.ubuntu.com/6530253

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

Thank!

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

marked as duplicate by karel, Eric Carvalho, Kevin Bowen, bodhi.zazen, Eliah Kagan May 2 at 18:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
"when I login in tty1, bash returns an error mensage in the file /etc/profile" What is the complete and exact text of that error message, and do you have any reason to think this error is related to your inability to log in graphically? (I suppose it could be--with most desktop environments, ~/.profile does get sourced on graphical login.) When you use the backup of .profile that doesn't produce the error, does that appear to affect the behavior of the graphical login screen in any way, when you try to log in? –  Eliah Kagan May 2 at 18:41

5 Answers 5

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
2  
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

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

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 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

Press CTRL+ALT+F1 and log in there and run:

$ sudo chmod 1777 /tmp

$ sudo chown root.root /tmp

Then press CTRL+ALT+F7 then try to login using GUI.

Some times this happen of you dont have proper permissions on /tmp

share|improve this answer

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