Linux – Suse 11 Sp2 pam-config doesn’t work

linuxopensusepamsles

I try to add pam_ldap module in Suse 11 Sp1 Server 64 bit using:

 pam-config -a --ldap

OS information:

 node01:~ # file $(which pam-config)
 /usr/sbin/pam-config: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux     2.6.4, dynamically linked (uses shared libs), stripped
 node01:~ # uname -m
 x86_64

So i think the command pam-config well be uses the pam module in this path /lib64/security/pam_ldap.so

But isn't like that, it looks under /lib/security/ directory, so it looks for 32 bit version of the pam module

node01:~ #  pam-config --add --ldap
ERROR: module /lib/security/pam_ldap.so is not installed.
pam-config: invalid option -- --ldap
Try `pam-config --help' or `pam-config --usage' for more information.

Using strace:

access("/lib/security/pam_ldap.so", F_OK) = -1 ENOENT (No such file or directory)

pam-config doesn't found the 3bit version module for ldap, but it found for 64 bit

access("/lib64/security/pam_ldap.so", F_OK) = 0
write(2, "pam-config: invalid option -- --"..., 37pam-config: invalid option -- --ldap
) = 37
write(2, "Try `pam-config --help' or `pam-"..., 70Try `pam-config --help' or `pam-config    --usage' for more information.
) = 70
exit_group(1)                           = ?

pam_ldap modules installed

node01:~ # zypper se pam_ldap
Loading repository data...
Reading installed packages...

S | Name           | Summary                              | Type   
--+----------------+--------------------------------------+--------
i | pam_ldap       | A PAM Module for LDAP Authentication | package
| pam_ldap-32bit | A PAM Module for LDAP Authentication | package

I install pam_ldap-32bit or create a symlink with:

ln -s /lib64/security/pam_ldap.so /lib/security/pam_ldap.so

And this way, it work

So my question is, why 64 bit binary looking for 32bit version library?

Best Answer

node01:~ # ldd /usr/sbin/pam-config 
linux-vdso.so.1 =>  (0x00007fffc9cf4000)
libc.so.6 => /lib64/libc.so.6 (0x00007fddf5579000)
/lib64/ld-linux-x86-64.so.2 (0x00007fddf5920000)

node01:~ # echo $LD_LIBRARY_PATH

node01:~ # [[ -z $LD_LIBRARY_PATH ]] && echo "empty" 
empty