TITLE:		PAM Install from Scratch
LFS VERSION:	any
AUTHOR:		unknown <unknown>

SYNOPSIS:
	How to install PAM from scratch.

HINT:
1) Download the following from http://www.kernel.org/pub/linux/libs/pam/pre/library/

     Linux-PAM-0.72.tar.gz
     cracklib-files.tgz

2) Unpack cracklib-files.tgz - this will create a folder called usr.. do not go into it.

3) Install cracklib-files

     > cp usr/include/* /usr/include
     > cp usr/lib/* /usr/lib
     > cp usr/sbin/* /usr/sbin

4) Unpack Linux-PAM-0.72

5) Configure Linux-PAM-0.72 for Compile

     Linux-PAM-0.72> cd Linux-PAM-0.72
     Linux-PAM-0.72> rm default.defs
     Linux-PAM-0.72> ln -s defs/linux.defs default.defs

     Edit default.defs ARCH=i586
     Change to your arch type if you want optimizations

     Edit the toplevel Makefile
     find HAVE_PWDBLIB=yes
     change to HAVE_PWDBLIB=no 
     We are doing this becuase libpwdb is very hard to find and isn't well maintained anyway. If your have it, go ahead and leave this entry alone.

     Edit modules/pam_mkhomedir/Makefile
     find $(LD_D)  -o $@ $(LIBOBJD) $(LINKLIBS) -lpam
     Remove the -lpam
     Line should look like this
     $(LD_D)  -o $@ $(LIBOBJD) $(LINKLIB

     Edit modules/pam_unix/Makefile
     $(CC) -o $(CHKPWD) $^ $(LDLIBS)
     Add -lcrypt to it after $(CHKPWD)
     Line should look like this
     $(CC) -o $(CHKPWD) -lcrypt $^ $(LDLIBS)

6) Build and Install Linux-PAM-0.72

     Linux-PAM-0.72> make
     Linux-PAM-0.72> make install

     Say yes to create /etc/pam.conf