5

When I type in my password to my newly installed Ubuntu 14.04 computer, it returns me to the login screen. I've seen other answers but those were to Ubuntu 13.04 and older and didn't work.

4
  • 1
    Ctrl+Alt+F1, login, rm .Xauthority, Alt+F7, login and report back.
    – s3lph
    May 27, 2015 at 14:30
  • But where is the .Xauthority file, I've seen that answer before but on Ubuntu 13.04 and older.
    – jjjhfam
    May 27, 2015 at 14:43
  • It is a hidden file in /home/username folder also known as your (username's) home folder. The rm command deletes the file. It will be recreated the next time you login using the GUI.
    – user68186
    May 27, 2015 at 14:51
  • As I said, I've never been in my account so when I am in that directory and type 'ls -a' I do not see it.
    – jjjhfam
    May 27, 2015 at 15:41

9 Answers 9

4

Press Ctrl + Alt + F1 and log in there and run:

sudo chown -R $USER:$USER $HOME

Then press Ctrl + Alt + F7 and try to log in.

1
  • 2
    This worked like charm on Ubuntu 18.04 with a difference of hitting Ctrl + Alt + F2 to get to text terminal session and Ctrl + Alt + F1 to get back to GUI session Mar 31, 2019 at 3:16
2

I had same issue i was setting up oracle and messed up with .bashrc PATH variable, with this i could not get past the login screen. Thing that solved my issue was that, in .bashrc, I accidentally did not append $PATH: in PATH variable.

I wrote:

PATH=<other paths>

Correct format:

PATH=$PATH:<other paths>

This worked for me, if this is the case it should work for you too.

1

Look at here: Can't login to Ubuntu 14.04 after upgrade maybe can help you.

  1. Check the $HOME permission and owner, chown $USER:$USER -R $HOME; chmod +x -R $HOME, or try to use a Guest Session, or try adduser to create a user then login.

  2. Try reinstall Ubuntu Desktop, sudo apt-get install --reinstall ubuntu-desktop ubuntu-session.

  3. If all above can't work, maybe the lightdm is break, try to fix sudo apt-get install lightdm --reinstall.

  4. Or, just try to use kdm & Kde desktop: sudo apt-get install kubuntu-desktop kde-standard. (。・_・。)

6
  • You seem to be having trouble typing "reinstall", but I was able to add another user account and then add myself to the sudo file. Thanks!
    – jjjhfam
    May 27, 2015 at 16:30
  • Thx. Does it that mean you can login ubuntu with another account? If so, just backup your old $HOME directory, and create a new $HOME directory then replace it. (´・ω・`)
    – scue
    May 29, 2015 at 13:58
  • Yep, I just went into the virtual terminal and moved the files I wanted from old to new account.
    – jjjhfam
    May 29, 2015 at 20:18
  • 4
    Don't execute chmod +x -R $HOME, it will make ALL files in $HOME executable. Please change this in the original comment.
    – Minras
    Jan 23, 2017 at 10:34
  • I was able to ssh into my account, and execute the reinstall of Unbuntu Dekstop from there. I restarted the VM and it was fixed.
    – nixkuroi
    Apr 8, 2019 at 19:35
1

I had similar issue on fresh 18.04 install. Safemode worked well, normal mode kept kicking me out after logging in. UI also lagged during animations, so it was clear that was a graphics issue. So I just updated my Nvidia drivers and it worked.

sudo add-apt-repository ppa:graphics-drivers

sudo apt-get update

sudo apt-get install nvidia-390
0

Do experience any graphical glitches?

This might be the result of Unity not beeing able to start due to a problem with getting 3D acceleration - so your graphics-card driver is in question (thanks for nothing compiz).

Do you happen to know which graphics card you are using? When in doubt you can press CTRL+ALT+F1, login, type:

lspic | grep VGA

usually you ll get something like

you@yourPc:~$ lspci | grep VGA 01:00.0 VGA compatible controller: NVIDIA Corporation GK110B [GeForce GTX 780 Ti] (rev a1)

You'll then have to update your graphics-card driver, which either might be:

ATI/AMD:

sudo apt-get install fglrx

NVIDIA:

sudo apt-get install nvidia-current

Intel cards usualy don't cause problems.

If this all did not help you might consider booting an older kernel from GRUB, if any is installed. (you can return to your graphical enviroment by pressing CTRL+ALT+F7)

0

I had the same problem in 16.04

rm .Xauthority // like the_Seppi said
sudo chown -R $USER:$USER $HOME // like praveen said
chmod +x -R $HOME

and a reboot

did it fore me

1
  • 3
    Why chmod +x -R $HOME? it will make ALL files in $HOME executable.
    – Minras
    Jan 23, 2017 at 10:36
0

I had same problem with Ubuntu 18.10 and following method help me:

  1. At the login screen use Alt+Ctrl+F3 to access the command line login method.

  2. Log in to the shell with your username and password.

  3. Uninstall and reinstall Ubuntu lightdm. Run the following (be sure to connect to the network):

    sudo apt-get purge lightdm
    sudo apt-get install lightdm
    dpkg-reconfigure lightdm
    
  4. Once reconfigured, now reboot.

0

after having lots of headaches trying to solve the same problem, adding my user to the video group solved it !

sudo usermod -a -G video {USER}

-2

In version 18 it asks for a new password for user ubuntu which I entered. I used 4-l's for my password for user ubuntu. Ubuntu wil not accept the old password or the 4-l's. Based upon the fact that I cannot login to ubuntu I will move on to another os. I like to buy my haay before it goes through the bull. My recommendation for version 18 users is wuuit ehile you are ahead.

1
  • 1
    You are answering a question from 2015. Your answer does not provide anything useful to the poster of the original question and sounds more like a rant.
    – Kurankat
    Mar 27, 2020 at 5:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .