Cannot login lightdm | TTY

Hi,

After updating my system using pacman, I can no longer login in from my display manager lightdm, nor from the TTY (using ctrl+ alt + f2 for example).
I tried to chroot from a live usb with an archiso, and the password works fine from it. I can change it using passwd, perform everything I need from there, but when I go back to logging in from lightdm or tty, password does not work.
I tried to create a new user with no password, but I cannot login with it either. I tried to change the password to something very simple, e.g., “test” or a single character, to check if it wasn’t a keyboard layout issue. Does not work either.
Even after chrooting again from a live usb, the password changes I made are still here so it is beiing applied.

Other stuff I tried that did not worked:

  • Deleting the .Xauthority file in my home directory
  • Unlocking my user using faillock --user myUsername --reset

Here are the logs from /etc/var/lightdm/lightdm.log :
http://ix.io/4r8x

It worked perfectly fine before this update and never had any issues.

Let me know if I can provide any other informations that could help.

Hi and welcome to :enos: forums. Also, to the purple side of Linux :enos_flag:.

May we know what DE/WM you’re using?

Thanks for your reply !

I have both, the default xfce DE from the installation, and Hyprland.

I had a similar issue a few years ago. My problem was in the key ring it became corrupt somehow during the update. I tried all kinds of solutions and none of them worked. I ended up having to a reinstall in order to solve it. Hopefully you wont need to

Hope it won’t come to that.

Wouldn’t it be possible to reset the keyring ?

There could be several reasons for this issue, so you should collect various info to find the actual reason.
First, check pacman.log to see which packages were changed and any interesting messages.

I have some questions on your posted details.

With chroot, you log into the root user. Did you try to log into root from your system in TTY?

Which user account are you referring to? As said, chroot logs into root. :grey_question:

IIRC, you can’t use nopassword in TTY. Do you test in TTY, or LightDM?

Did you check file/folder permissions/ownership?

Lightdm log does not have helpful info. Journal should have better info for this error. You can get journal logs from a cold (not running) system, from a Live ISO.

As you see, you have to be more precise with descriptions, as this issue has a lot to think of. :wink:

Thanks for taking time to look at my issue !

There could be several reasons for this issue, so you should collect various info to find the actual reason.
First, check pacman.log to see which packages were changed and any interesting messages.

Here is the content of pacman log
http://ix.io/4rfv

With chroot, you log into the root user. Did you try to log into root from your system in TTY?

Yes, it also did not worked.
however, as my regular user has sudo privileges (I know I know it’s bad :roll_eyes:) and I never log into the root account, I cannot garanty that the password I entered is correct.

Which user account are you referring to? As said, chroot logs into root. :grey_question:

I did a su myuser then passwd to change my password, it asks for my current password, I enter it, it works fine. I enter the new password, no error shown.
If I do it again, only the new password works, so at least somewhere, the change is properly made.

IIRC, you can’t use nopassword in TTY. Do you test in TTY, or LightDM?

I tried both, none worked :confused:
Good to know that no password does not works in tty :slightly_smiling_face:

Did you check file/folder permissions/owbership?

Are there important files to check other than . Xauthority ?

$ ls -l .Xauthority
-rw------- 1 myUser myUser 0 Mar. 8 19:46 .Xauthority

Lightdm log does not have helpful info. Journal should have better info for this error. You can get journal logs from a cold (not running) system, from a Live ISO.

Output from journalctl -D /mnt/var/log/journal -e
http://ix.io/4rfB

Hope it has all the informations you asked :grinning:

1 Like

It’s the opposite, IMHO. Using normal user with sudo for system maintenance is the good practice.

About the issue, you said it started after an update, but which one?
In one process, glib2 was upgraded, which could potentially create a similar mess, if it had a bug. :person_shrugging:

Keyboard layout could be the actual problem, so I suggest you check relevant things.
When you chroot (since it is the only successful way to get into a semi-live system), get this from root login, and from your normal user login:

localectl

Also check for /etc/default/keyboard file existence. If it exists, disable it (rename, or move to a backup dir/filename), and post contents.

For repo issues assurance, I would confirm mirrorlists are good (and update again, if changing servers).

Maybe @dalto has some idea, checking pacman hooks messages (?), or everything :person_shrugging: .

Mar 19 07:36:47 nicolas-bladestealth login[661]: FAILED LOGIN 1 FROM tty3 FOR nicolas, Authentication failure
Mar 19 07:36:50 nicolas-bladestealth login[661]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty3 ruser= rhost=  user=nicolas
Mar 19 07:36:52 nicolas-bladestealth login[661]: FAILED LOGIN 2 FROM tty3 FOR nicolas, Authentication failure
Mar 19 07:37:07 nicolas-bladestealth login[661]: pam_systemd_home(login:auth): User name not set.
Mar 19 07:37:08 nicolas-bladestealth login[661]: pam_unix(login:auth): check pass; user unknown
Mar 19 07:37:08 nicolas-bladestealth login[661]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty3 ruser= rhost=
Mar 19 07:37:10 nicolas-bladestealth login[661]: FAILED LOGIN 3 FROM tty3 FOR , Authentication failure

ls -l /sbin/unix_chkpwd /etc/passwd /etc/shadow /etc/group
to see permissions… may done some chmod chown thingy?

to see cat /etc/shells could show nalso if you may miss the used shell there…

1 Like

About the issue, you said it started after an update, but which one?
It was the one from the 13/03,
From pacman log : [2023-03-13T10:45:11+0100] [PACMAN] Running 'pacman -S -y -u --config /etc/pacman.conf --'

In one process, glib2 was upgraded, which could potentially create a similar mess, if it had a bug. :person_shrugging:

Did a pacman -Su glib2 which had an update, nothing changed :confused:

Keyboard layout could be the actual problem, so I suggest you check relevant things.

I see no issue when I enter my login in tty, and it seems to be the correct french AZERTY keyboard.

When you chroot (since it is the only successful way to get into a semi-live system), get this from root login, and from your normal user login:

localectl

For both root and normal user I get
System has not been booted with systems as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

From htop, I can see that PID 1 is sbin/init

Also check for /etc/default/keyboard file existence. If it exists, disable it (rename, or move to a backup dir/filename), and post contents.

It exist, here is the output of cat /etc/default/keyboard :
http://ix.io/4rm8
I moved it, default keyboard is now qwerty. Still does not worked (when entering the password using qwerty ofc)

ls -l /sbin/unix_chkpwd /etc/passwd /etc/shadow /etc/group
to see permissions… may done some chmod chown thingy?

Output of ls -l /sbin/unix_chkpwd /etc/passwd /etc/shadow /etc/group :

http://ix.io/4rmd
Everything has read except /etc/shadow, tried to `chmod +rrr’ in case of, but did not worked.

to see cat /etc/shells could show nalso if you may miss the used shell there…

Output of cat /etc/shells :

http://ix.io/4rmf

Thanks for your help guys, hope we will figure it out :slight_smile:

1 Like

My system has this rw for root, which sounds reasonable.
Check root and user entries (needs root privileges):

grep -E "^root|^<your$USERname>" /etc/shadow | cut -d: -f3-

You should be able to add write for root, with:

chmod -v u+w /etc/shadow

Check root and user entries (needs root privileges):

Output of grep -E "^root|^<your$USERname>" /etc/shadow | cut -d: -f3-
http://ix.io/4rrY

You should be able to add write for root, with:
It does not seems to had any effect :confused:

:face_with_raised_eyebrow:

If you want some company in your journey, you need to at least pay attention… :slightly_frowning_face:
Details, means “post terminal contents” (input and output of commands), not your impression.
I personally have many other things to do, than begging for your help to help you :person_shrugging: .

Sorry I should have given the output of the command.

Output for chmod -v u+w /etc/shadow :

mode of '/etc/shadow' retained as 0600 (rw-------)