I created a new user account from System Settings > User Accounts.

I can log in to new user account from the terminal but I can't log in to user account from GUI.

When I try to log in to the newly created user account from GUI it doesn't show any error and goes back to the login window. (When I type a wrong password it shows the incorrect password error but when I enter the right password, it simply goes back to the login window without any message.)

I am using Ubuntu 14.04.4 LTS

  • 2
    Probably wrong permissions on the new user's ~/.Xauthority – user423626 Apr 16 '16 at 7:00
  • @BharadwajRaju how to check .Xauthority permission for user? – Pragnesh Chauhan Apr 18 '16 at 3:56
  • Can this issue be locale-related, as mentioned here? – whtyger Apr 18 '16 at 19:49
  • Did you try all the solutions mentioned here? – Byte Commander Apr 20 '16 at 17:34
  • yes, I have tried that also, even I can't login with guest account – Pragnesh Chauhan Apr 22 '16 at 5:26

It seems like that account is disabled. Open the system settings, select the account, unlock changes. Look next to "password," and if it says "account disabled," click that and select an option. If that doesn't work, it is an issue I do not know how to fix. I was on 15.10, and all my logins broke. In that case, backup your computer, get a Live CD or USB from another computer, and reinstall Ubuntu. I had to do it. I hope it's the first.

  • password is set so account is not disabled – Pragnesh Chauhan Apr 25 '16 at 5:40
  • Hi! I am sorry you are having trouble with your login. This is an issue I do not know how to fix. All I can suggest is to back up your data and re-install Ubuntu. – user531011 Apr 26 '16 at 3:14
  • well, now I am shifted to xubuntu and it is working fine for me – Pragnesh Chauhan Apr 26 '16 at 6:38

Had the same issue once I created a new user either via command line or the GUI. Everything would look like it created without any errors but when I tried to login it would blink to loading the desktop of a second then flip back to the login screen.

Looked and the useradd nor the GUI-Users both failed to create the users home folder '/home/$USER' so I copied another users folder:

cd /home
sudo cp -R bob $USER

Replacing bob with the name of the good users folder and replace $USER with the account name of the new user. Then you have to set the permissions to the new folder.

sudo chown -R $USER:$USER $USER

Replacing $USER with the account name of the new user again. So if the new account name was rsmith then it would look like this.

sudo chown -R rsmith:rsmith rsmith

This fixed my issue and allowed me to finally login as the new user.


Maybe your home directory's permission is set to root thats why it goes back to login window. I also had the same problem a while ago, i can log in but after a seconds, it goes back to login window.

try changing your home directory using your terminal:

sudo chown -R $USER:$USER /home/user_name
  • That command changes all the permissions to root, why not do sudo chown -R $USER:$USER /home/$USER? – Zzzach... Apr 22 '16 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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