You are not logged in.

#1 2020-08-21 08:21:08

shirozuki
Member
Registered: 2018-12-13
Posts: 3

Can't log in after system update

Hi Everyone!

I haven't used my Arch installation for about three weeks - until yesterday. So the first thing I did was a full system upgrade. Unfortunately, after reboot I am unable to login as any user (including root): interactive shell prompts for user, then password and returns with a message: "login incorrect". I was able to chroot into my installation with live usb and change the root password with the passwd command. Unfortunately, that didn't help, I still can't login the normal way. I haven't touched anything else beside performing the system update. I do not use any login manager, just plain console. Could someone please give me a hint how I should troubleshoot this bizzare problem?

Offline

#2 2020-08-21 08:31:41

loqs
Member
Registered: 2014-03-06
Posts: 17,436

Re: Can't log in after system update

Offline

#3 2020-08-21 08:59:48

shirozuki
Member
Registered: 2018-12-13
Posts: 3

Re: Can't log in after system update

Well, now I'm little embarassed. Problem is solved. Thank You loqs!

Offline

#4 2020-08-21 09:11:56

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

Hi shirozuki,

I have used my computer yesterday and used pacman -Syu. After leaving the Computer for a while it locked and I was no longer able to log into the system in any way. I also was resetting the root password which also didn't help.

As in the link of loqs I am also found some issues with pambase in the past. The whole chroot is new for me (except for using it during the install of Arch on my system). I am using a Manjaro Live-USB and am still experimenting (I start a trip tomorrow and will reach to my destination on monday, which is why it is one of the worst things considering the timing). I hope to be able to fix it on the airport if I will be able to obtain some access for researching and learning about all the "rescue"-steps to be a better archer wink
If there was a quick solution I would prefer it because I am really into trouble with all this.

I'll keep you updated if I will have managed to solve it. If you got the solution first I would be glad to try it also on my system.

Offline

#5 2020-08-21 09:39:31

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

What I did now:

chroot into the system using the guide:
https://wiki.archlinux.de/title/Chroot_ … eparieren)

downgrade pambase following
https://wiki.archlinux.org/index.php/Do … g_packages

In my case I used:

 # sudo pacman -U /var/cache/pacman/pkg/pambase-20190105.1-2-any.pkg.tar.xz
 

Set pacman to ignore pambase during system upgrades.
/etc/pacman.conf
edit from:

 #IgnorePkg = 

into

 IgnorePkg = pambase 

I made the post from the live system.
I will try it the problem got solved and confirm it if so.

Last edited by capitanito (2020-08-21 09:51:55)

Offline

#6 2020-08-21 09:50:20

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

capitanito wrote:

chroot into the system using the guide:
https://wiki.archlinux.de/title/Chroot_ … eparieren)

downgrade pambase following
https://wiki.archlinux.org/index.php/Do … g_packages

In my case I used:

 # sudo pacman -U /var/cache/pacman/pkg/pambase-20190105.1-2-any.pkg.tar.xz
 

Set pacman to ignore pambase during system upgrades.
/etc/pacman.conf
edit from:

 #IgnorePkg = 

into

 IgnorePkg = pambase 

I made the post from the live system.
I will try it the problem got solved and confirm it if so.

It did not work. Am I missing something ?

Offline

#7 2020-08-21 09:58:36

shirozuki
Member
Registered: 2018-12-13
Posts: 3

Re: Can't log in after system update

capitanito wrote:
capitanito wrote:

chroot into the system using the guide:
https://wiki.archlinux.de/title/Chroot_ … eparieren)

downgrade pambase following
https://wiki.archlinux.org/index.php/Do … g_packages

In my case I used:

 # sudo pacman -U /var/cache/pacman/pkg/pambase-20190105.1-2-any.pkg.tar.xz
 

Set pacman to ignore pambase during system upgrades.
/etc/pacman.conf
edit from:

 #IgnorePkg = 

into

 IgnorePkg = pambase 

I made the post from the live system.
I will try it the problem got solved and confirm it if so.

It did not work. Am I missing something ?

capitanito,
You should also downgrade the pam package using the same way you did with the pambase smile

Offline

#8 2020-08-21 10:25:32

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

Thanks for the quick response.
So here the changes since my last post:

pam downgrade

# sudo pacman -U /var/cache/pacman/pkg/pam-1.3.1-2-x86_64.pkg.tar.xz

/etc/pacman.conf

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGro>
IgnorePkg   = pambase,pam

I will try it now.

Last edited by capitanito (2020-08-21 10:25:50)

Offline

#9 2020-08-21 10:35:30

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

shirozuki wrote:
capitanito wrote:
capitanito wrote:

chroot into the system using the guide:
https://wiki.archlinux.de/title/Chroot_ … eparieren)

downgrade pambase following
https://wiki.archlinux.org/index.php/Do … g_packages

In my case I used:

 # sudo pacman -U /var/cache/pacman/pkg/pambase-20190105.1-2-any.pkg.tar.xz
 

Set pacman to ignore pambase during system upgrades.
/etc/pacman.conf
edit from:

 #IgnorePkg = 

into

 IgnorePkg = pambase 

I made the post from the live system.
I will try it the problem got solved and confirm it if so.

It did not work. Am I missing something ?

capitanito,
You should also downgrade the pam package using the same way you did with the pambase smile

It works big_smile

Thanks for the support.

The OS is awesome.
The community is awesome.
YOU are awesome !!

Offline

#10 2020-08-21 14:58:34

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Can't log in after system update

Why that complicated? Why not just do what is suggested in the bugreport?

Offline

#11 2020-08-21 15:22:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,771

Re: Can't log in after system update

Please don't give dangerous advice that will lead to a partially upgraded system when this can be resolved by properly reading and acting on pacman's output.

https://wiki.archlinux.org/index.php/Sy … nsupported

In summary: Read pacman's output and for this particular case check /etc/pam.d/ for .pacnew files and merge them accordingly. A few modules were dropped from pam and should not be used anymore, in particular tally.

This is a core package, you will eventually run into issues if you keep it downgraded.

Last edited by V1del (2020-08-21 15:31:37)

Offline

#12 2020-09-01 11:28:40

noreset
Member
Registered: 2018-09-19
Posts: 53

Re: Can't log in after system update

Sorry for using this thread for such a dumb question but I'm facing issues.

I've experienced the same problem of not being able to login and found this discussion about it, now I'm trying to follow the solution posted by Ioqs, although, when I entered the rescue mode the system asks for the root password for maintainance and despite all my efforts to try to log into it, it is still giving me a login incorrect message. I tried the passwords I used in the past, plus the toor one, though nothing works and I'm desperate at this moment. Can some gentle soul give me an hand with this?

Thanks guys

Last edited by noreset (2020-09-01 11:33:16)

Offline

#13 2020-09-01 11:38:41

loqs
Member
Registered: 2014-03-06
Posts: 17,436

Re: Can't log in after system update

Reset_lost_root_password#Using_a_LiveCD
Then can you login using rescue.target?

Offline

#14 2020-09-01 12:52:15

noreset
Member
Registered: 2018-09-19
Posts: 53

Re: Can't log in after system update

loqs wrote:

Reset_lost_root_password#Using_a_LiveCD
Then can you login using rescue.target?

Ok, I've been able to edit the root password and login to the rescue mode.

Now I'm checking the folders into /etc/pam.d, though I can just see system-auth, there is no system-auth.pacnew

EDIT: The only .pacnew file I got is system-login.pacnew, do I have to merge this with system-login? And if yes, what exactly 'merge' means?

EDIT2: Ok, I was completely missing what a .pacnew file is, but now I learned it, in fact I merged the two files I reported within the first edit and now I can login into my account again. Sometimes I just forget what being an Arch user means!

Thank you Ioqs for your help

Last edited by noreset (2020-09-04 22:53:17)

Offline

#15 2020-09-04 16:41:58

capitanito
Member
Registered: 2020-05-21
Posts: 21

Re: Can't log in after system update

So now I have got some time to focus on this issue.

I revoked the

IgnorePkg = pam, pambase 

by commenting it out via #.
Then I have made a full system upgrade (obviously including pam and pambase).

Afterwards I chrooted into the system and added the last line in /etc/pam.d/login:

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login
[b]password	include	system-local-login[/b]

As it did not help anything I commented out the tally2 parts in /etc/pam.d/system-login :

#%PAM-1.0

[b]#auth       required   pam_tally2.so        onerr=succeed file=/var/log/tallylog[/b]
auth       required   pam_shells.so
auth       requisite  pam_nologin.so
auth       include    system-auth

[b]#account    required   pam_tally2.so [/b]
account    required   pam_access.so
account    required   pam_nologin.so
account    include    system-auth

password   include    system-auth

session    optional   pam_loginuid.so
session    optional   pam_keyinit.so       force revoke
session    include    system-auth
session    optional   pam_motd.so          motd=/etc/motd
session    optional   pam_mail.so          dir=/var/spool/mail standard quiet
-session   optional   pam_systemd.so
session    required   pam_env.so
session    optional   pam_cgfs.so -c freezer,memory,name=systemd,unified

Now I can log in into the system without any issues for now.
But as I unterstood the problem I could just use the /etc/pam.d/system-login.pacnew file and replace the above mentioned system-login with it. Also deleting the last line in /etc/pam.d/login which I added as it seems not to be necessary.

So in short (just to be clear): the only real change would have been to replace the /etc/pam.d/system-login file with /etc/pam.d/system-login.pacnew file. Am I right ?

Sorry if this question seems to be stupid, but I am recently decided to do a complete dive into the Linux world leaving my Windows times behind. I have read a lot but wanted to assure me to have it understood the right way.

And here the code of /etc/pam.d/system-login.pacnew:

#%PAM-1.0

auth       required   pam_shells.so
auth       requisite  pam_nologin.so
auth       include    system-auth

account    required   pam_access.so
account    required   pam_nologin.so
account    include    system-auth

password   include    system-auth

session    optional   pam_loginuid.so
session    optional   pam_keyinit.so       force revoke
session    include    system-auth
session    optional   pam_motd.so          motd=/etc/motd
session    optional   pam_mail.so          dir=/var/spool/mail standard quiet
-session   optional   pam_systemd.so
session    required   pam_env.so           user_readenv=1

Last edited by capitanito (2020-09-04 16:44:44)

Offline

#16 2020-09-04 17:07:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,771

Re: Can't log in after system update

That is correct yes. The only reason a pacnew was created in the first place is because you (... or a program) edited that file at some point in the past. Dealing with .pacnew files should be something you get acustomed to, while they are often not needed to be immediately acted upon, this was a special case where having old incorrect configuration prevented your log in. Read https://wiki.archlinux.org/index.php/Pa … nd_Pacsave for how this mechanism works and a list of tools that can help you in the future.

Also note that this varies on a case by case basis. You need to judge whether the changes in a pacnew file are relevant to your system, one particular case is that the default filesystem package comes with a baseline passwd file. That's one that you basically never want to overwrite or merge with your existing file, because in that case you will be locked out as well.

Offline

#17 2020-09-04 22:39:24

zauser
Member
Registered: 2012-02-14
Posts: 6

Re: Can't log in after system update

Sorry for the (maybe stupid) question:

I have the files "login" and "login.pacnew" in /etc/pam.d (there is no other .pacnew file). Which console command do I have to use in order to merge this two files in an appropriate way?

Thank you so much!

Offline

#18 2020-09-04 22:40:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,771

Re: Can't log in after system update

If you don't know what you did to the original file just take the .pacnew file as is and overwrite the old login file

Offline

#19 2020-09-04 22:57:02

zauser
Member
Registered: 2012-02-14
Posts: 6

Re: Can't log in after system update

WOW!!! Thank you so much. The following worked for me:

rm -R /etc/pam.d/login
mv /etc/pam.d/login.pacnew /etc/pam.d/login

Now I can login again!!!

Offline

#20 2022-12-01 15:25:43

ktulu
Member
Registered: 2014-02-18
Posts: 2

Re: Can't log in after system update

I had the same problem after running checkservices (which left no .pacnew files). I could solve it by running arch-chroot with an usb stick, and then running passwd to set new passwords both for root and for my user.

Offline

#21 2022-12-02 01:41:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Can't log in after system update

Closing this old thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB