Score:0

How do I fix the Ubuntu Login Loop Problem

bb flag

I am using ubuntu 18.04 as a dual boot with my windows and the storage got full, which caused a login loop problem. I try to login into the system with the correct password but the screen flashes to black, couple of seconds later, I'm back at the login stage.

There is nothing wrong with my password since I can log in to my user account on the Terminal (CTRL+ALT+F1). Once there, I did a sudo apt update/upgrade in the hopes it'd fix something, but my system was up to date and it didn't solve anything after I rebooted.

My question: I have some important folders on my computer. How do I solve the loop login problem? Could I free up some space by deleting some files from my desktop? can I copy my files using the Terminal (CTRL+ALT+F1)?

So, what should I do to fix this login problem?

guiverc avatar
cn flag
A full drive (or full $HOME which is the user directory) will prevent a GUI login, but will not prevent a login via text terminal, allowing you to create space and fix the problem. If it was a fresh install; you shouldn't have problems given the minimum suggested space is 25GB for any Ubuntu 17.10 or later install so details of what space you allocated may be needed to understand your issue (https://help.ubuntu.com/community/Installation/SystemRequirements) (*You can access all files from terminal but I'd fix your space issues there too and then you can use your GU*I)
programmer1234 avatar
bb flag
it is not fresh, I have been using this system for 2 years. It got full over time. I do not remember how much space I allocated but it was definitely more than 25G.
guiverc avatar
cn flag
The comment was based on your "*mine was a fresh install*" - if you've been using it 2 years it's not what I'd call *fresh*.
programmer1234 avatar
bb flag
sorry, it was a mistake, I fixed that.
guiverc avatar
cn flag
Does this answer your question? [Ubuntu gets stuck in a login loop](https://askubuntu.com/questions/223501/ubuntu-gets-stuck-in-a-login-loop) (see the answer by Philippe Gachoud)
programmer1234 avatar
bb flag
No, it does not.
user535733 avatar
cn flag
You seems to be asking an [XY Question](https://en.wikipedia.org/wiki/XY_problem). Your *actual* problem is accessing and recovering data from a full disk. But you're *asking* instead about a "login loop". You can't fix that with a full disk -- the full disk is the likely *cause* of the failing GUI login. Several previous comments (@karel) have tried to point you in the right direction. Listen to them.
programmer1234 avatar
bb flag
@user535733, I have a login loop problem and I assume that the storage caused this issue. When I put my password it returns back to the same login page. My question is how do I solve the login loop problem? since I have some files that I need to copy after getting into the system.
Score:1
ru flag

If you've been starting graphic applications from the terminal using sudo, that's what probably caused your problem. Always use sudo -H.

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type:

 - sudo mount -o remount,rw / # remount the disk as rw

Note: If you have a disk full problem, here's where you can manually delete unnecessary files.

 - cd /home/your_username # change directory

 - ls -al .*thority* # list some files

You should see something like this...

-rw------- 1 your_username your_username 407910 Nov  2 08:56 .ICEauthority
-rw------- 1 your_username your_username     58 Jun 23  2017 .Xauthority

If it DOES NOT show -rw------- then...

  • sudo chmod 600 .*thority* # change file protection

If it DOES SHOW root root then...

  • sudo chown your_username:your_username .*thority* # change file ownership

  • reboot # reboot the computer

Reboot and see if you can log in.

Score:0
bb flag

Since I knew I have a storage problem, I logged in using (CTRL+ALT+F3) and started to delete some files that I knew that will not need them. I rebooted the system, the problem was solved.

user535733 avatar
cn flag
I'm pleased to see that you figured out the easy solution!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.