What happened: After reviewing a "emerge -avuUD @world" output, which looked fine, I let it run and went away for a hour. When I came back I could not login by any means (UI, terminal, ssh) and from the cooler sounds I understood that system is not under load, so the update is likely interrupted. I was locked out without any hope for "auto-resolution".
The root cause: My update contained 646 packages. #158 was pam (pam-1.3.1_p20200128-r1 -> pam-1.5.1), which removed some modules as stated in the news, and it went through. Package #243 has failed to build (unrelated to pam) and the update was interrupted. The pambase package upgrade (pambase-20200304 -> pambase-20201103) that supposed to update the configs was scheduled to be #462. Thus all logins have failed with the messages
Code: Select all
login[16993]: PAM unable to dlopen(/lib64/security/pam_tally2.so): /lib64/security/pam_tally2.so: cannot open shared object file: No such file or directory
login[16993]: PAM adding faulty module: /lib64/security/pam_tally2.so
login[16993]: PAM unable to dlopen(/lib64/security/pam_cracklib.so): /lib64/security/pam_cracklib.so: cannot open shared object file: No such file or directory
login[16993]: PAM adding faulty module: /lib64/security/pam_cracklib.so
login[16993]: FAILED LOGIN (1) on '/dev/tty1' FOR '***', Module is unknown
How to avoid: I don't think it's fully possible at this point. Pam and pambase should go together, ideally in one package, otherwise the lock out in cases like this is imminent. I found other threads with the same problem (1, 2) and I somewhat understand maintenance challenges, however I think it should be designed to avoid failure as much as possible.
What's your opinion? How would you avoid this problem in the future?




