Can't login to Ubuntu GUI with correct password

13,792

I see 2 possible problems.

Wrong permissions on .Xauthority file.

Run chown username:username .Xauthority on a terminal in your home directory. Replace username with your actual username.

The .Xauthority-file can be found in each user home directory and is used to store credentials in cookies. You can find more info on X authentication and X authority in the xauth man pages (type man xauth in a terminal). If you are not the owner of this file you can't login since you can't store your credentials there.

Broken packages and dependencies.

Start Ubuntu in recovery mode from grub, select dpkg wait until it finishes and you are done.

Share:
13,792

Related videos on Youtube

BSAI Techno Sales
Author by

BSAI Techno Sales

Updated on September 18, 2022

Comments

  • BSAI Techno Sales
    BSAI Techno Sales over 1 year

    Despite entering the correct password, I am unable to login to GUI in Ubuntu 16.04.

    I tried few steps from the following those questions on askubuntu, but they did not work at all.

    Any feedback is appreciated.

    • guiverc
      guiverc over 6 years
      I would suggest switching to a terminal (eg. ctrl+alt+f4) and trying to login there. If you can login file (proving your password is correct), it could be you've run out of space, and a command df -hi will show disk-free. The GUI requires space for temporary files, and is the first thing I check. These two (wrong password, no space) are the two first checks I do....
    • BSAI Techno Sales
      BSAI Techno Sales over 6 years
      i am able to login from terminal but not from gui. Also i checked df -hi , there is no issue with disk space. Besides i even following the steps from the following url as well but even this did not help me out youtube.com/watch?v=Li-rTbyJLXc
  • MadMike
    MadMike over 6 years
    While your solution might work, may I suggest you expand what you think triggers the error and how your command fixes it?
  • AsenM
    AsenM over 6 years
    I added second cause and fix and more info, I hope you are happy :)
  • MadMike
    MadMike over 6 years
    Your edit is a big improvement. I've been so bold to change your formatting and also did some rewording. Feel free to access the version history and revert it back to your liking.
  • AsenM
    AsenM over 6 years
    Thanks for the edit! My English isn't very good.
  • BSAI Techno Sales
    BSAI Techno Sales over 6 years
    I tried sudo chown bsaitechnosales:bsaitechnosales ~/.Xauthority [prev] chown: cannot access '/home/bsaitechnosales.Xauthority': No such file or directory [/prev] Please advise
  • BSAI Techno Sales
    BSAI Techno Sales over 6 years
    AsenM, You mentioned Start Ubuntu in recovery mode from grub, select dpkg wait until it finishes and you are done. Here my question is when you say select dpkg means what command do you want me to run. Was it dpkg --configure -a command or apt-get update command or apt-get install -f command or apt-get dist-upgrade command or
  • manolius
    manolius almost 4 years
    You saved me! Big hug for you. Damn covid-19!