28

I have a problem that i never seen before. I upgraded my Ubuntu 12.04 64bit to 14.04 using the following command:

$ sudo update-manager -d

After that I can't login to my user account, when I log it just flashes and then it goes back to the login screen, but the odd thing is that I can log in with the guest account.

I tried to create another account but couldn't log to that account either.

FYI I don't have any graphic cards like NVIDIA or AMD.

  • From the login screen, press CTRL+ALT+F1 to get to a prompt, and login. Check the permissions and owner of your home directory (ls -l /home). Your home directory should be owned by your user ID. – Jos Apr 24 '14 at 16:24
  • It is already owned by my user and it has the permission r-x, i changed the permission to rwx but that didn't worked either. – cesar.rickinho Apr 24 '14 at 16:31
  • In that case, if you didn't already, you should change the permissions recursively: sudo chmod -R u+w /home/[username] – Jos Apr 24 '14 at 16:36
  • Done. But still not working. – cesar.rickinho Apr 24 '14 at 17:04
  • Ok i changed the permission of the user and the group of the user to rwx and it worked. I am going to restore the original permissions to see if it will work, but for now i'm going to see how the sytem is responding and if there is any bug. Thanks for the help Jos. – cesar.rickinho Apr 24 '14 at 17:08
14

What worked for the original poster was: recursively correcting the permissions of their home directory.

sudo chmod -R ug+rwx /home/[username]

To be more specific, the problem is with the .Xauthority in your home folder. You simply need to change its permissions to yourself or, as it was in my case, it was owned by root, so I needed to change the owner to my user. This way you don't need to change the permissions for every file in your home folder.

  • 7
    To be more specific, the problem is with the .Xauthority in your home folder. You simply need to change its permissions to yourself or, as it was in my case, it was owned by root, so I needed to change the owner to my user. This way you don't need to change the permissions for every file in your home folder. – Vítor Baptista May 5 '14 at 2:35
  • 1
    IMHO it is unnecessary to give execution permission +x for all the files under one's home folder. – souravc Jul 17 '14 at 2:26
  • @souravc yes, however removing the execute bit on a directory means you cannot "enter" it to use it or browse files. Unless you are root. – Chris K Dec 24 '14 at 21:17
  • 1
    this is a bad idea! Many of the config directories and files in $HOME should have 700 or 600 permission for security. If the mode of Xauthority needs to be fixed, then fix it. Recursive chmod is almost always a terrible idea... – Zanna Jan 2 '17 at 11:10
  • In the end, this helped me out a bunch: ubuntuforums.org/showthread.php?t=2267058 – aaiezza Jan 8 '17 at 19:23
10

I am having the same problem. Fixed by chown the whole home directory.

chown -R [user-name]:[user-name] /home/[user-name]

details in this post Unable to mount home-directory for user after fresh install 14.04

  • Worked for me. I did a fresh install but tried to keep my home (another partition). Thank you. – Scoup Oct 2 '14 at 16:41
2

In my case my /home filesystem is on a separate partition, and after an update, for some reason the entry in my /etc/fstab to mount /home had been commented out. Booted into recovery mode to get a root shell so that I could edit /etc/fstab and re-instate the entry.

  • 1
    I think you have provided a very good answer for a future op with this problem, however it would be of assistance to them to know what they may need to do once in the recovery menus to reach a terminal, mount the disk in RW access, and perhaps even where to locate the fstab file... – Charles Green Aug 13 '14 at 22:32
2

I tried this and it worked for me:

sudo apt-get install --reinstall ubuntu-session

(Source)

  • 1
    I have the same issue and when I give this command I get:ubuntu-session is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 463 not upgraded. – Deesbek Apr 4 '15 at 5:17
1

I had that too. It seems that 14.04 uses something called ubuntu-session for login, while the old 12.04 used something called unity-desktop. Since I tried to upgrade from the desktop itself, there were problems deleting it, and I was barred from logging in the next time.

To fix, boot the machine, and as soon as the grub loader comes up, scroll down to "Advanced options for Ubuntu" which will probably be the 2nd entry. Hit enter. On the next page, choose "Ubuntu, with Linux 3.13.0-30 (recovery mode)" or a similar entry. It could be the 2nd entry on that page. This brings up some recovery options.

Scroll down to the thing that says "network Enable networking" and hit enter. This is IMPORTANT, otherwise Ubuntu can't find the files it needs on the internet. After networking is enabled, scroll to "dpkg Repair broken packages" and hit enter. That should install the needed ubuntu-session, delete the old unity-desktop, and fix up any other things that were missed also.

protected by Community Sep 5 '14 at 3:00

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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