libpam-runtime fails to upgrade from feisty to intrepid

Bug #295135 reported by gcbirzan
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pam (Ubuntu)
Fix Released
Undecided
Steve Langasek

Bug Description

Binary package hint: libpam-runtime

After getting the debconf questions about configuring libpam-ldap, no matter what I select, I get:

Setting up libpam-runtime (1.0.1-4ubuntu5) ...
Undefined subroutine &main::x_loadtemplatefile called at /usr/sbin/pam-auth-update line 99.
dpkg: error processing libpam-runtime (--configure):
 subprocess post-installation script returned error exit status 9
Errors were encountered while processing:
 libpam-runtime
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@linfin4:/var/cache/apt/archives# dpkg -l '*pam*' | grep ^i
ii libpam-foreground 0.3 create lockfiles describing which users own
ii libpam-ldap 180-1.7 Pluggable Authentication Module allowing LDA
ii libpam-modules 0.79-4ubuntu2 Pluggable Authentication Modules for PAM
iF libpam-runtime 1.0.1-4ubuntu5 Runtime support for the PAM library
ii libpam0g 0.79-4ubuntu2 Pluggable Authentication Modules library
root@linfin4:/var/cache/apt/archives#

Related branches

Revision history for this message
hackeron (hackeron) wrote :

I'm having the same issue without the libpam-ldap configuration:

Need to get 0B/678kB of archives.
After this operation, 1872kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up liblocale-gettext-perl (1.05-4build1) ...
Setting up libpam-runtime (1.0.1-4ubuntu5.3) ...
Undefined subroutine &main::x_loadtemplatefile called at /usr/sbin/pam-auth-update line 99.
dpkg: error processing libpam-runtime (--configure):
 subprocess post-installation script returned error exit status 9
Setting up libtext-charwidth-perl (0.04-5build1) ...
Setting up libtext-iconv-perl (1.7-1build1) ...
Errors were encountered while processing:
 libpam-runtime
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Stefan Strasser (strada) wrote :

Afterwards I had an error with the update-manager and cancelled then the upgrade.

I guess my errors were caused by myself: I installed updates from 8.04 including a new kernel if I remember correctly. Afterwards I did not reboot, but changed the setting to be able to install non-LTS-distribution-upgrades and then started the upgrade to 8.10.

I could repair the system by doing a "dpkg --configure -a".

Now my system is consistent again and works. Only the passwords for wireless-security and my fingerprint seem to be lost and I had to re-enter them.

Revision history for this message
Steve Langasek (vorlon) wrote :

This error happens if you don't have a version of debconf installed that implements x_loadtemplatefile, which is possible because libpam-runtime is missing a versioned dependency on debconf (>= 1.5.19). But Ubuntu 8.04 shipped with debconf 1.5.20, so this is only possible if you've bypassed upgrading to Ubuntu 8.04 before upgrading to Ubuntu 8.10, as Stefan notes.

Upgrading the debconf package will fix this error. I'll correct the package dependency in jaunty so that this is handled automatically for future upgrades (mostly applicable for the next LTS release).

Changed in pam:
assignee: nobody → vorlon
status: New → Confirmed
Steve Langasek (vorlon)
Changed in pam:
status: Confirmed → Fix Committed
Revision history for this message
Robert Browne (rlist) wrote :

Can confirm this bug when upgrading to Ubuntu 8.10. Installing latest debconf fixed it.
The latest version of libpam-runtime in ubuntu updates still depends on debconf > 0.5,
so this bug is still not fixed.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 295135] Re: libpam-runtime fails to upgrade from feisty to intrepid

On Fri, Nov 14, 2008 at 12:42:23AM -0000, Robert Browne wrote:
> Can confirm this bug when upgrading to Ubuntu 8.10. Installing latest debconf fixed it.
> The latest version of libpam-runtime in ubuntu updates still depends on debconf > 0.5,
> so this bug is still not fixed.

And no one has committed to fixing it in Ubuntu 8.10; this bug only affects
users who don't upgrade to Ubuntu 8.04 before upgrading to Ubuntu 8.10,
which is not a supported upgrade path.

Revision history for this message
Stefan Strasser (strada) wrote :

@Steve: I did work with 8.04 before upgrading to 8.10, I didn't break the official upgrade path!
I just did not reboot after the last (about 6-7) packages-updates in 8.04 before upgrading to 8.10.

I have another notebook with 8.04, I'll test the upgrade to 8.10 also with that one (but with that one there is no fingerprint-reader, if this affects the situation).

Revision history for this message
Steve Langasek (vorlon) wrote :

Stefan, there's simply no way that's possible. The version of the debconf package included with Ubuntu 8.04 is 1.5.20, and definitely implements the x_loadtemplatefile function in the error message shown in this bug description. If you saw this error message, then you had an earlier version of debconf installed, which means you were not fully upgraded to Ubuntu 8.04 before upgrading to Ubuntu 8.10.

Rebooting also has nothing to do with it.

Revision history for this message
Val-libre (vallibre) wrote :

@Steve

Well, I have the same bug and :

 LANG=C apt-cache policy debconf
     1.5.23ubuntu2 0
        500 http://fr.archive.ubuntu.com intrepid/main Packages
     1.5.20 0
        500 http://fr.archive.ubuntu.com hardy/main Packages
 *** 1.5.14ubuntu1 0

You're assuming that everyeone should have installed from scratch since hardy ? intrepid ? (like windows ;) but what about smooth upgrade since gutsy !?
Anyway, a package do not have to rely on "history". It should work on its own.

By the way, it is not always possible to upgrade debconf (easily)

 LANG=C apt-get install debconf
...
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

And LANG=C apt-get -f install

leads to :

Undefined subroutine &main::x_loadtemplatefile called at /usr/sbin/pam-auth-update line 99.
dpkg: error processing libpam-runtime (--configure):
 subprocess post-installation script returned error exit status 9
Errors were encountered while processing:
 libpam-runtime
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Steve Langasek (vorlon) wrote :

On Tue, Dec 30, 2008 at 10:34:30AM -0000, Val-libre wrote:
> You're assuming that everyeone should have installed from scratch since
> hardy ? intrepid ?

No; I'm telling you that direct upgrades from gutsy to intrepid, without
first upgrading to hardy as an intermediate step, are not supported.

> And LANG=C apt-get -f install

> leads to :

> Undefined subroutine &main::x_loadtemplatefile called at /usr/sbin/pam-auth-update line 99.
> dpkg: error processing libpam-runtime (--configure):
> subprocess post-installation script returned error exit status 9
> Errors were encountered while processing:
> libpam-runtime
> E: Sub-process /usr/bin/dpkg returned an error code (1)

Downgrade to the hardy version of libpam-runtime (and related packages as
necessary), then upgrade debconf.

Revision history for this message
Steve Langasek (vorlon) wrote :

This bug was fixed in the upload of pam 1.0.1-5ubuntu1. Changes:

pam (1.0.1-5ubuntu1) jaunty; urgency=low

  * Merge from Debian unstable
  * Remaining changes:
    - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's not
      present there or in /etc/security/pam_env.conf. (should send to Debian).
    - debian/libpam0g.postinst: only ask questions during update-manager when
      there are non-default services running.
    - debian/patches-applied/series: Ubuntu patches are as below ...
    - debian/patches-applied/ubuntu-fix_standard_types: Use standard u_int8_t
      type rather than __u8.
    - debian/patches-applied/ubuntu-no-error-if-missingok: add a new, magic
      module option 'missingok' which will suppress logging of errors by
      libpam if the module is not found.
    - debian/patches-applied/ubuntu-regression_fix_securetty: prompt for
      password on bad username.
    - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
      initialise RLIMIT_NICE rather than relying on the kernel limits.
    - debian/patches-applied/ubuntu-user_defined_environment: Look at
      ~/.pam_environment too, with the same format as
      /etc/security/pam_env.conf. (Originally patch 100; converted to quilt.)
    - Change Vcs-Bzr to point at the Ubuntu branch.
    - debian/local/pam-auth-update (et al): new interface for managing
      /etc/pam.d/common-*, using drop-in config snippets provided by module
      packages.
    - debian/local/common-password, debian/pam-configs/unix: switch from
      "md5" to "sha512" as password crypt default.
  * Bump the version numbers referenced in the config files, again, as pam
    has revved in Debian and moved the bar.
  * pam-auth-update: If /var/lib/pam/seen is absent, treat this the same
    as a present but empty file; thanks to Greg Price for the patch.
    LP: #294513.
  * pam-auth-update: Ignore removed profiles when detecting an empty set
    of currently-enabled modules. Thanks to Greg Price for this as well.
  * debian/control: libpam-runtime needs a versioned dependency on
    debconf, because it uses the x_loadtemplatefile extension that's
    not supported by debconf versions before hardy. LP: #295135.
  * pam-auth-update: trim leading whitespace from multiline fields when
    parsing PAM profiles. LP: #295441.
  * pam-auth-update: factor out the duplicate code used for returning
    the lines for a given module

  [ Jonathan Marsden ]
  * debian/patches/027_pam_limits_better_init_allow_explicit_root:
    Add to patch, documenting how to set limits for root user.
    Include an example. Alters limits.conf, limits.conf.5.xml,
    and limits.conf.5 . (LP: #65244)

Changed in pam:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.