5

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

Paulo Nesello
  • 81
  • 1
  • 1
  • 4
  • "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 02 '15 at 18:41

5 Answers5

3

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

sudo chown 777 .Xauthority

g_p
  • 18,504
0

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
rusty
  • 16,327
0

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.

Dennis
  • 171
0

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.

James
  • 141
0

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

PKumar
  • 2,952