3

This question already has an answer here:

This is a rather bizarre problem that I am experiencing. My Ubuntu 14.10 does not let me log in despite proper password. Here is what happens:

I try to log into my machine by entering the password. The password gets accepted, my laptop screen blinks, and brings me back to the login screen.

After having tried this many times I tried Guest Session. When I click on login in guest session, the same story repeats itself.

The only thing different from yesterday (when I could properly log in) is that I installed virtual box and Genymotion for Android development. Also, I made a simple change to /etc/profile to have genymotion in my path.

How do I solve this?

marked as duplicate by Eric Carvalho, Anwar, user364819, Charles Green, Thomas Ward Jun 13 '17 at 17:46

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.

2

Open the terminal using CTRL + ALT + F1 (or whatever key works for you).
While in your home directory, type the command cat .xsession-errors.

This will give you the error that is causing the login screen loop. In my case it was an error in the /etc/profile that I had edited last night.

  • Whay was the error? – Anwar Jun 8 '17 at 13:49
  • @Anwar it was some PATH related issue. I had a stray space in the path so it broke. – Little Child Jun 10 '17 at 10:33
0

Among all the possible issues the most common two are:

The .Xauthority file in the user's home directory could be owned by root. The ownership and permissions should look like:

-rw-------  1 user user   58 Feb 13 07:37 .Xauthority

In this case you need to delete the /home/user/.Xauthority file owned by root logging in from a console (<ALT>+<CTL>+<F1-7>) and then try to login to the xsession.

Another thing that can happen is that the /tmp does not have the sticky bit set i.e. has the wrong permissions. The permissions should be:

drwxrwxrwt   8 root   root    4096 Feb 13 08:17 tmp

In this case you need to set the sticky bit to /tmp by logging in from a console:

sudo chmod 1777 /tmp
0

Are you able to log in by hitting CTRL+ALT+F1 to bring up a terminal and then put in your username and password. If you can, then please post the output of the following command here:

tail -30 /var/log/Xorg.0.log

and

tail -30 /var/log/syslog

  • If you have no easy way to copy/paste the output, the just do this: sudo apt-get install pastebinit && tail -50 /var/log/syslog | pastebinit – Socceroos Feb 13 '15 at 2:35
0

If you installed nvidia drivers:

  • Press Ctrl+Alt+F1 to get to the terminal login
  • Provide username and password
  • Enter:

    sudo apt-get purge nvidia-* 
    
  • Reboot using the command poweroff
  • 1
    OP said nothing about nvidia drivers though – Zanna Apr 17 '17 at 16:31

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