The log output shows that you have pam_tally or pam_tally2 in your pam configuration. The preinst fails in order to save you from upgrading and breaking your system, leaving you with a configuration referencing an obsolete pam module.
The message says: you are using pam_tally or pam_tally2 in your configuration The pam_tally and pam_tally2 modules have been removed from PAM. You are using one of these modules in your PAM configuration in /etc/pam.d. You must remove the uses of these modules before PAM can be upgraded; including these modules in your PAM configuration after the upgrade will stop users from being able to log into the system. Consider the pam_faillock module as a replacement for pam_tally. The fact that this message was shown to you via the pam preinst script also indicates that you were not using ubuntu-release-upgrader, the recommended way to upgrade between Ubuntu releases. On servers, please upgrading using 'sudo do-release-upgrade'. On desktops, please use 'update-manager'. ** Changed in: pam (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to pam in Ubuntu. https://bugs.launchpad.net/bugs/2051594 Title: package libpam-modules 1.3.1-5ubuntu4.7 failed to install/upgrade: new libpam-modules:amd64 package pre-installation script subprocess returned error exit status 2 Status in pam package in Ubuntu: Invalid Bug description: failed during upgrade ProblemType: Package DistroRelease: Ubuntu 20.04 Package: libpam-modules 1.3.1-5ubuntu4.7 ProcVersionSignature: Ubuntu 5.4.0-170.188-generic 5.4.257 Uname: Linux 5.4.0-170-generic x86_64 ApportVersion: 2.20.11-0ubuntu27.27 Architecture: amd64 CasperMD5CheckResult: skip Date: Mon Jan 29 13:45:41 2024 ErrorMessage: new libpam-modules:amd64 package pre-installation script subprocess returned error exit status 2 InstallationDate: Installed on 2017-09-02 (2340 days ago) InstallationMedia: Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04 PythonDetails: N/A RelatedPackageVersions: dpkg 1.21.1ubuntu2.2 apt 2.0.10 SourcePackage: pam Title: package libpam-modules 1.3.1-5ubuntu4.7 failed to install/upgrade: new libpam-modules:amd64 package pre-installation script subprocess returned error exit status 2 UpgradeStatus: Upgraded to focal on 2024-01-29 (0 days ago) modified.conffile..etc.security.limits.conf: [modified] mtime.conffile..etc.security.limits.conf: 2017-09-01T17:53:53.083396 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/2051594/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp