2

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?

  • please post result of ldd /usr/sbin/pam-config and echo $LD_LIBRARY_PATH – Giovanni Tirloni Aug 31 '14 at 2:02
1
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
  • some one down vote the question but without answer the question, thanks – c4f4t0r Sep 20 '14 at 15:47
0

run

sudo zypper install   pam_ldap # then you will be able to run the following command with no error.

pam-config --add --ldap

The following files will be modified by the pam-config command /etc/pam.d directory:

  • common-password
  • common-auth
  • common-session-pc

This is the line was added

auth  required        pam_ldap.so     use_first_pass

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.