libpam-geoip not working on Ubuntu 14.04 Server

Bug #1329263 reported by porzech
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pam-geoip (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

after instaling using apt and configuring in /etc/pam.d when i try to login i get error in /var/log/auth.log:
PAM unable to dlopen(pam_geoip.so): /lib/security/pam_geoip.so: cannot open shared object file: No such file or director

After symlinking to /lib/x86_64-linux-gnu/security/pam_geoip.so i get another error:
PAM unable to dlopen(pam_geoip.so): /lib/security/pam_geoip.so: undefined symbol: GeoIPRecord_delete

Relevant config line from /etc/pam.d/sshd
account required pam_geoip.so geoip_db=/etc/security/GeoLiteCity.dat system_file=/etc/security/geoip.conf action=allow

file /etc/security/GeoLiteCity.dat exists and contains valid geoip data

# lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04

# apt-cache policy libpam-geoip
libpam-geoip:
  Installed: 1.1-1
  Candidate: 1.1-1
  Version table:
 *** 1.1-1 0
        500 http://pl.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

Tags: patch pam
Revision history for this message
ray le (raliski) wrote :

I can confirm exactly the same problem on Ubuntu 12.04 having compiled it from http://ankh-morp.org/code/pam_geoip/#DOWNLOADS

Changed in pam-geoip (Ubuntu):
status: New → Confirmed
Revision history for this message
ray le (raliski) wrote :

same problem on ubuntu 12.04 with package from https://launchpad.net/ubuntu/saucy/amd64/libpam-geoip/1.1-1

tags: added: pam
Revision history for this message
Espux (espen-evinnes) wrote :

I played around with the pam_geoip-1.1 source from http://ankh-morp.org/code/pam_geoip/#DOWNLOADS

I successfully compiled and used pam_geiop.so after applying the following change in Makefile:

pam_geoip.so: pam_geoip.o
        $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ pam_geoip.o

to:

pam_geoip.so: $(OBJECTS)
        $(CC) $(CCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)

Revision history for this message
Espux (espen-evinnes) wrote :

Sorry, but that should actually be:

pam_geoip.so: $(OBJECTS)
        $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(OBJECTS)

to:

pam_geoip.so: $(OBJECTS)
        $(CC) $(CCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)

Revision history for this message
Xela (indigoxela) wrote :

as pam_geoip works in Debian, they obviously fixed it.
Attached is of 01-multiarch-libdir.diff in sid.

The difference is tiny:

-PAM_LIB_DIR=$(DESTDIR)/lib/security
+PAM_LIB_DIR=$(DESTDIR)/lib/$(MULTIARCH)/security

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Debian sid package diff for multiarch support" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Scott Logan (silogan) wrote :

Ran into this bug today in xenial.

Built from the source debs - I can confirm that the Debian patch in #5 is not sufficient (and seemed to be included anyway). I needed the makefile change described in #4 as well.

It also doesn't seem to like the Country databases - I needed to download and use the City databases to get this working.

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.