Score:0

lightdm crash (once) & thereafter login screen shows "failed to authenticate" - impossible to login

in flag

OS: ubuntu 20.04 with lightdm
HW: Raspberry Pi 4B 8GB

History: this system has worked for well over a year without issues.

There was a random crash of the sound system (this has happened before), my normal cure for this is to reboot. Usually it works.

This time, I could not log in after reboot. The lightdm greeting screen seems to want to auto login (I disabled auto login a long time ago) and shows the error message failed to authenticate.

How do I investigate and fix this problem?

Some things I tried:

  1. reboot - no impact, may have caused the initial problem
  2. apt reinstall lightdm; reboot - no impact
  3. commented out kwallet in pam configuration of lightdm - no impact other than a few error messages less in the logs
  4. ssh - remote login works, this is my way in (tty also works)

Edit:

  1. removed and reinstalled lightdm - no impact other than changing the login splash screen

    apt purge lightdm
    apt update
    apt install lightdm
    dpkg-reconfigure lightdm
    reboot
    
  2. created /etc/lightdm/lightdm.conf as below - it did add a 'login' button to the login screen, but there still isn't any box to enter a username or a password, so I can't login.

    [SeatDefaults]
    greeter-show-manual-login = true
    greeter-hide-users = false
    allow-guest = false
    

Note: my system does not have gdm.

Logs & files:

/etc/lightdm/lightdm.conf does not exist:

> ls -alR /etc/lightdm
/etc/lightdm:
total 24
drwxr-xr-x   3 root root  4096 Sep 13 23:38 .
drwxr-xr-x 151 root root 12288 Sep 13 22:26 ..
drwxr-xr-x   2 root root  4096 Feb  7  2020 lightdm.conf.d
-rw-r--r--   1 root root   466 Feb  7  2020 users.conf

/etc/lightdm/lightdm.conf.d:
total 8
drwxr-xr-x 2 root root 4096 Feb  7  2020 .
drwxr-xr-x 3 root root 4096 Sep 13 23:38 ..

/var/log/apport.log shows many repeats of the following lines, one for each retry or reboot:

ERROR: apport (pid 2458) <date/time>: executable: /usr/sbin/lightdm (command line "lightdm --session-child 13 20")
ERROR: apport (pid 2458) <date/time>: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 2458) <date/time>: this executable already crashed 2 times, ignoring

Crash report (around the first reboot, not sure whether it happened before or after my first reboot to try and solve my sound system issue):

> ls -al /var/crash/
total 228
drwxrwsrwt  2 root     whoopsie   4096 Sep 13 17:14 .
drwxr-xr-x 14 root     root       4096 Dec 15  2020 ..
-rw-r-----  1 root     whoopsie 219359 Sep 13 17:14 _usr_sbin_lightdm.0.crash
-rw-r--r--  1 root     whoopsie      0 Sep 13 17:14 _usr_sbin_lightdm.0.upload
-rw-------  1 whoopsie whoopsie     37 Sep 13 17:14 _usr_sbin_lightdm.0.uploaded

/var/log/lightdm/lightdm.log (last few, relevant lines):

[+6.37s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+7.24s] DEBUG: Greeter start authentication for ubuntu
[+7.24s] DEBUG: Session pid=2455: Started with service 'lightdm', username 'ubuntu'
[+8.71s] DEBUG: Session pid=2455: Terminated with signal 11
[+8.71s] DEBUG: Session: Failed during authentication
[+8.71s] DEBUG: Authenticate result for user ubuntu: Authentication stopped before completion
[+8.71s] DEBUG: Seat seat0: Session stopped
Score:0
in flag

I believe the problem was an update that did not fully complete and corrupted some links in the snap directory of the user's home.

Below I show a corrected directory structure, before correction the current links were pointing at numbers / directory names that did not exist.

> tree -L 2 snap
snap
├── chromium
│   ├── 1383
│   ├── 1417
│   ├── 1740
│   ├── 1816
│   ├── common
│   └── current -> 1816
├── rpi-imager
│   ├── 171
│   ├── 185
│   ├── common
│   └── current -> 185
└── ubuntu-mate-welcome
    ├── 574
    ├── 627
    ├── 648
    ├── common
    └── current -> 648
Score:0
ar flag

I just yesterday had an issuethat lightdm would not log me ion anymore but that was on 18.04. what I did to resolve thisd was:

# apt purge lightdm
# apt update
# apt install lightdm
# dpkg-reconfigure lightdm
# reboot

Which fixed it for me, good luck!

in flag
Thank you but that did not solve my problem. All it did is change the login splash screen.
stdcerr avatar
ar flag
@asoundmove Sorry to hear, have you tried using another dm instead of lightdm? Give gdm or xdm a try...?
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.