PAM LDAP module

After you download and unpack the pam_ldap archive, change directories to the top of the unpacked archive. You will need to edit the Make.defs file to match the libraries you compiled. The following lines will need to be edited. The CDEFS line appears in several places and can be commented out and uncommented depending on the libraries you are compiling with. The following lines are for the mozilla LDAP module, which I compiled and installed the libraries libldap.so and liblber.so in /lib/. The CVS code I downloaded into my user directory.

Example 3-1. The Mozilla LDAP Module

   LDAP_LIB_DIR= /lib
  
   LDAP_INC_DIR= ˜/ldap-cvs/mozilla/dist/Linux-2.2.10_x86_DBG.OBJ/include
  
   LDAPLIBS= -L$(LDAP_LIB_DIR) -llber -lldap
  
   CDEFS= -g $(WARNINGS) -D_REENTRANT -DLDAP_VERSION3_API -DNETSCAPE_API_EXTENSIONS

After you have configured your Make.defs file simply run make -f Makefile.linux and make -f Makefile.linux install. This will install the pam_ldap.so into /lib/security and modify the permissions. The only step left, will be to edit the proper files in /etc/pam.d/ so that the imap and pop services use the pam_ldap module to authenticate users.