[SOLVED] Cannot Login (login loop)

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
playr018

[SOLVED] Cannot Login (login loop)

Post by playr018 »

Hi. I'm writing from Guest session. I cannot login into GUI Linux Mint 18.2 Xfce 64-bit (installed since August 2017 or earlier).
My system (information provided by inxi -Fxxxr | pastebin (I can't remember for sure how many "x" and other letters) https://gist.github.com/anonymous/4f3dd ... c8876b6249
After I stopped the lightdm service from terminal session and rebooted my PC, appeared the Login screen on which I am entering the password without errors but it returns me back into Login screen. I am able to use Guest (from Login screen) and any Terminal session (Ctlr+Alt+F1 or F2, etc.).
One of errors I have got on the terminal while I was trying to start the GUI with "startx" command was:

Code: Select all

system-ligind [2427]: Failed to start user service, ignoring: Unknown unit user@1000.service
I tried to move .config and .gconfig, even .Xauthority. Not helped retrieved back like it was. Reinstalled and reconfigured Xfce - xfwm4 (sudo dpkg-reconfigure xfwm4) and reinstalled "lightdm". Still nothing.
Is there something I should try before I make a new installation? I haven't found nothing helpful here, on other forums I have seen similar issue for Arch.
Sorry for your time and thank you in advance for any answer.
======
My quick solution (worked for me):
I installed mdm

Code: Select all

sudo apt-get install mdm
then

Code: Select all

sudo dpkg-reconfigure mdm
And I logged successfully in (as usual).
In other cases it could be useful to read (in case my way haven's solved this) this - lighghtdm - Ubuntu gets stuck in a login loop (same login loop as mine).
It is some weird bug or error of lightdm after using sudo with startx command...
Last edited by playr018 on Mon Jan 15, 2018 4:47 pm, edited 2 times in total.
playr018

Re: Cannot Login

Post by playr018 »

Maybe there is some Login error because after I stopped the Xserver by

Code: Select all

sudo service lightdm stop
used sudo to start the Xserver by

Code: Select all

sudo startx
and now I cannot login GUI with my username, only as guest or as root (on default Xfce desktop).
---------Edit----------
Can I just try to upgrade from Terminal (Ctrl+Alt+F1) to Mint 18.3?

Code: Select all

sudo apt-get dist-upgrade
Is that okay or this can be a possible solution? Should I stop lightdm first?[/i]
playr018

Re: Cannot Login

Post by playr018 »

Hi. Finally I solved this!
First of all - "sudo apt-get dist-upgrade" - returned: "nothing to upgrade" :(
I read some similar problems with login on lightdm and .Xauthority, tried to reinstall and reconfigure lightdm, removed nvidia driver and installed open source nouveau, removed and reinstalled xserver, the reconfigured. Then I found this Ubuntu topic - lighghtdm - Ubuntu gets stuck in a login loop where I found the author was having the same error on login screen "My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back. " Made the same things as one person answered (the best answer). But still the same... Then I read somewhere this can be a strange error or bug of lightdm after using "sudo startx" instead of "startx". So I decided to keep the reinstalled lightdm and install and use mdm. After the installation and configuration to use mdm a new login screen appeared - I entered the same password as always and voila! :D I see again my Desktop as usual user!
Why lightdm is not working right anymore? I don't know... But since now I will use mdm instead!
Maybe this will help someone before you decide to make a fresh install, try this. Good luck!
OoDeLally
Level 1
Level 1
Posts: 6
Joined: Tue Jul 24, 2018 4:24 am

Re: [SOLVED] Cannot Login (login loop)

Post by OoDeLally »

I had a similar problem.
On login screen, when I was clicking on my username, the screen went black and loop back to a new login screen.
The problem was that I added myself (me as a user) in the nopasswdlogin group. This is an old feature that seems to be obsolete now, but it still messes with the login process. After removing myself from that group, the login screen worked again.
Hope it helps some people.
BobSongs

Re: [SOLVED] Cannot Login (login loop)

Post by BobSongs »

Just thought I'd pipe in on this topic... because this is one of those "just-in-case" posts.

My son's laptop wasn't logging in. It displayed all the symptoms of a corrupted .ICEauthority/.Xauthority that I've seen. Here's what resolved his problem.

I inserted the Linux Mint start-up USB. Fired up ol' GPartEd and noticed immediately that his / partition was... full. Yep. I set it up for him, but I admit that the base Linux system has grown in size since Breezy Badger. Clearly, the original partition size of 25gb was simply not enough.

Using GPartEd, I solved the problem by reducing his /home partition by about 12gb. /swap shifted accordingly, leaving room to grow the system partition. Of course GPartEd warned me of cataclysmic events if I proceeded, but the changes were done within a virtual block. So, I had confidence in the effectiveness of the software. Worst case scenario: re-install Mint, update, tweak and restore software (Inkscape, MyPaint, etc.)

Upon reboot, everything was back to normal.
PatC

Re: [SOLVED] Cannot Login (login loop)

Post by PatC »

I've had this happen to me. I used "sudo startx" and it started the login loop. 🤨 when running sudo with startx it changes the permissions on .Xauthority file. I had to change the file permissions of .Xauthority from root back to the my account. It fixed the issue for me.
Banzai Beagle

Re: [SOLVED] Cannot Login (login loop)

Post by Banzai Beagle »

PatC wrote: Thu Sep 06, 2018 4:36 pm I've had this happen to me. I used "sudo startx" and it started the login loop. 🤨 when running sudo with startx it changes the permissions on .Xauthority file. I had to change the file permissions of .Xauthority from root back to the my account. It fixed the issue for me.
Can you explain to a newbie exactly how to do this?
mkruger

Re: [SOLVED] Cannot Login (login loop)

Post by mkruger »

Ran into a similar login loop. Turns out my 20GB virtual disk was 100% full.
The giveaway was when I tried to do an apt-get update.

I could log into the console, but not the desktop.
Cleaned the apt cache, and at least then could log into the desktop.
LinuxEnthusiast

Re: [SOLVED] Cannot Login (login loop)

Post by LinuxEnthusiast »

mkruger wrote: Tue Dec 04, 2018 12:28 am Ran into a similar login loop. Turns out my 20GB virtual disk was 100% full.
The giveaway was when I tried to do an apt-get update.

I could log into the console, but not the desktop.
Cleaned the apt cache, and at least then could log into the desktop.
I've run into the same problem here, only thing is that mine isn't a virtual drive and I am unable to login using software rendering mode either.
kokbira

Re: [SOLVED] Cannot Login (login loop)

Post by kokbira »

PatC wrote: Thu Sep 06, 2018 4:36 pm I've had this happen to me. I used "sudo startx" and it started the login loop. 🤨 when running sudo with startx it changes the permissions on .Xauthority file. I had to change the file permissions of .Xauthority from root back to the my account. It fixed the issue for me.
Oh yeah:

Code: Select all

sudo chown myuser:myuser /home/myuser/.Xauthority
Fixed my login, but I had also to change owner of my own home to solve other issues:

Code: Select all

sudo chown -R myuser:myuser /home/myuser
kokbira

Re: [SOLVED] Cannot Login (login loop)

Post by kokbira »

It happened for me when HD free space reaches 0. Is it a bug?
luth3r

Re: Cannot Login

Post by luth3r »

playr018 wrote: Mon Jan 15, 2018 4:38 pm Hi. Finally I solved this!
First of all - "sudo apt-get dist-upgrade" - returned: "nothing to upgrade" :(
I read some similar problems with login on lightdm and .Xauthority, tried to reinstall and reconfigure lightdm, removed nvidia driver and installed open source nouveau, removed and reinstalled xserver, the reconfigured. Then I found this Ubuntu topic - lighghtdm - Ubuntu gets stuck in a login loop where I found the author was having the same error on login screen "My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back. " Made the same things as one person answered (the best answer). But still the same... Then I read somewhere this can be a strange error or bug of lightdm after using "sudo startx" instead of "startx". So I decided to keep the reinstalled lightdm and install and use mdm. After the installation and configuration to use mdm a new login screen appeared - I entered the same password as always and voila! :D I see again my Desktop as usual user!
Why lightdm is not working right anymore? I don't know... But since now I will use mdm instead!
Maybe this will help someone before you decide to make a fresh install, try this. Good luck!
Great help last minute thread read really helps :)
Lohengrines

Re: [SOLVED] Cannot Login (login loop)

Post by Lohengrines »

kokbira wrote: Wed Dec 26, 2018 5:18 am It happened for me when HD free space reaches 0. Is it a bug?
Same here after upgrading from Mint 19 to 19.1 (I had absolutely no space left on my hard drive, falsely too many timeshift-snapshots were created)

The solution to login again is found here: viewtopic.php?f=90&t=253502

Short answer:
1. When seeing the login screen switch to terminal with "Ctrl+Alt+F2",
2. Type in your credentials and run this code

Code: Select all

sudo tune2fs -m0 /dev/sda2
3. Switch back to login screen with "Ctrl+Alt+F7"
4. Type in your credentials
5. Voilà, hopefully you'll see your desktop
6. Free up a lot of space!
sabatillz

Re: [SOLVED] Cannot Login (login loop)

Post by sabatillz »

playr018 wrote: Sun Jan 14, 2018 2:31 pm ======
My quick solution (worked for me):
I installed mdm

Code: Select all

sudo apt-get install mdm
then

Code: Select all

sudo dpkg-reconfigure mdm
it worked for me too, on a linux mint 19.
thanks playr018
Locked

Return to “Xfce”