Bug 210229

Summary: Unable to log in: "libpam.so.5" not found; ports are looking for old libpam.so -- __FreeBSD_version needs to be bumped
Product: Base System Reporter: ben.lavery <ben.lavery>
Component: binAssignee: Bryan Drewery <bdrewery>
Status: Closed FIXED    
Severity: Affects Some People CC: amd64, bdrewery, girgen, gjb, markj, ngie, tm
Priority: --- Keywords: regression
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
messages file from boot, includes attempted log in and subsequent failure. none

Description ben.lavery@hashbang0.com 2016-06-12 11:00:57 UTC
Created attachment 171331 [details]
messages file from boot, includes attempted log in and subsequent failure.

After upgrading to the head on Thursday/Friday I was unable to log into my FreeBSD-CURRENT laptop - console, X not started.  Having upgraded to base r301834 I still have this issue.

When trying to log in at the console I get the following error:

    Jun 12 11:41:37 BIL-BSD login: in try_dlopen(): /usr/local/lib/pam_gnome_keyring.so: Shared object "libpam.so.5" not found
    Jun 12 11:41:37 BIL-BSD login: in openpam_load_module(): no pam_gnome_keyring.so found
    Jun 12 11:41:37 BIL-BSD login: pam_start(): system error

I can, however, log in via SSH.

It seems that /usr/lib/libpam.so.5 has gone away in favour for /usr/lib/libpam.so.6 - using a symlink seems to be a dirty, temporary, workaround:

    %>ls -l /usr/lib/libpam.so.5
    lrwxr-xr-x  1 root  wheel    11B Jun 12 11:49 /usr/lib/libpam.so.5@ -> libpam.so.6
Comment 1 ben.lavery@hashbang0.com 2016-06-12 11:22:04 UTC
With some additional research, I believe this was introduced in base r301602 (/head/lib/libpam/Makefile.inc)
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2016-06-13 15:54:22 UTC
Over to committer of 301602 for comment.
Comment 3 Palle Girgensohn freebsd_committer 2016-06-13 20:09:30 UTC
Hi,

Seems to me you have run make delete-old-libs without first upgrading your ports? /usr/local/lib/pam_gnome_keyring.so must be rebuilt before you remove the old versions of the library? Or in any case, since you run CURRENT, this is the problem. 

    Jun 12 11:41:37 BIL-BSD login: in try_dlopen(): /usr/local/lib/pam_gnome_keyring.so: Shared object "libpam.so.5" not found

is because /usr/local/lib/pam_gnome_keyring.so was built when libpam.so.5 was that latest and greatest. It isn't anymore. Update your ports and things will work better. 

Cheers,
Palle
Comment 4 Enji Cooper freebsd_committer 2016-06-14 16:29:31 UTC
As I said in the commit email, __FreeBSD_version was never updated, so the package cluster hasn't rebuilt all of the packages requiring libpam.so, like security/sudo.

I've asked bdrewery/markj to help out because I can't commit right for a bit (my laptop is out of commission).
Comment 5 commit-hook freebsd_committer 2016-06-14 17:15:55 UTC
A commit references this bug:

Author: bdrewery
Date: Tue Jun 14 17:15:36 UTC 2016
New revision: 301892
URL: https://svnweb.freebsd.org/changeset/base/301892

Log:
  Bump __FreeBSD_version for r301602.

  Reported by:	ngie, Ben Lavery
  PR:		210229
  Approved by:	re (gjb)

Changes:
  head/sys/sys/param.h
Comment 6 Bryan Drewery freebsd_committer 2016-06-14 17:16:06 UTC
Fixed in src. Packages are built every other day and will get this fix then.
Comment 7 Enji Cooper freebsd_committer 2016-07-05 17:31:36 UTC
Workaround (since this hit me recently after I ran make delete-old-libs):

- Login as root [from single user mode if need be].
- Run the following command:
  echo 'libpam.so.5 libpam.so.6' >> /etc/libmap.conf