Skip to content

Can't login as user or root after upgrade

I just upgraded my system and pacman finished without problems. Everything worked fine, but once I got up to get a cup of tea, my screensaver locked the screen, and since then I can't login anymore.

It just says "Incorrect login" for every user I tried. I checked the keyboard layout, made sure that I didn't missspelled anything etc. I tried loggin in locally through gdm, from a real tty, per ssh, all with the same effect.

I even bootet the installer, decrypted my hdd and arch-chroot'ed into my system to reset the password for my user and for root, but still get the same error.

Do you guys have any ideas how I can further debug / solve this? When I'm in the chroot, I can normally change users and all the passwords are accepted, but when I boot normally, nothing works.

I'm really in need for help. This is my primary machine and I would really like to not have to reinstall it.

​

Thanks in advance!

28 points21 comments
Open on Reddit
About this post
Posted
Archived
Score
28 · 97% up
Kind
Text
ID
id6tem

Author

3
posts
6
comments
1
media
View profile

24 comments

Boot live usb, mount root at /mnt or boot single user mode

cd /mnt/etc/pam.d/  
mv system-login.pacnew system-login

There was a braking change in pam. This is why you don't ignore the warnings.

10 points

I was having this problem too. I knew it had something to do with PAM because last year I was tinkering with setting up an LDAP server, which needs to have its own PAM modules configured.

I wanted to consult the holy powers of Reddit and confirm it was PAM before I booted a live usb to fix it. Thanks for the help.

4 points

This is incorrect not always correct. I have no pacnew and got no warnings, and am still affected.

There are no pacnew files on my computer anymore (because I always take care of merging them) and I can't login.

3 points

Thanks for the hint, but unfortunately I don't have a system-auth.pacsave there. All I got is a system-login.pacnew. I'm going to try this now.

Can you point me to the announcement? Normally I would expect something like this to be on the mailing list, but perhaps I just missed it...

2 points

Really thanks for pointing me in the right direction, I copied my system-login.pacnew to system-login and now I can login again! Thanks a lot!

5 points

There is none, you have done manual changes to /etc/pam.d/system-login and pacman warns that it saves a .pacnew file when you update. This is expected behaviour

3 points
unknown author

Deleted before we saved it.

1 points

I have the same issue as OP, however there is no system-login.pacnew in my /etc/pam.d

Any idea?

2 points

What if I have the same issue but there js no pacsave or pacnew file?

1 points

If you can log in as root, try to change user_readenv=1 to user_readenv=0 in /etc/pam.d/system-login. If it works after that change then take a look at your ~/.pam_environment file (modify or remove/move it).

4 points
unknown author

Deleted before we saved it.

1 points

Thanks for this, it fixed the problem on my machine.

Note for others, you don't have to boot a live USB, I was able to login as root via the systemd rescue target. Append systemd.unit=rescue.target to you kernel params in the grub menu.

1 points
unknown author

Thank you so much, lots of reboots and arch-chroots before finding this in the update log

1 points

Thank you for this. I had the same problem, I also chrooted from a live usb and changed user and root password and still it did not work. I was about to reinstall everything, lol. Thanks!

BTW should I have seen a warning during installation? I probably was not paying attention.

1 points
unknown author

Deleted before we saved it.

1 points

Do you see your profile name in the shadow file? Can you log into root with no password?

1 points

In case anyone else is an idiot like me, I had this problem, and it turned out it was because one of the .pacnew files I merged was /etc/shadow, so it cleared all the passwords for all my accounts. I had to boot into a flash drive, then change both passwords (user and root) with passwd.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.