Référence : http://www.eduardosachs.org
Référence : Thomas Reifferscheid smbk5pwd

Ajouter les outils nécessaires à la compilation:
apt-get install build-essential
Compilation du module smbk5pwd:
cd /usr/lib 
ln -s liblber-2.4.so.2 liblber.so
ln -s libldap_r-2.4.so.2 libldap_r.so
cd /usr/src
apt-get source slapd
cd openldap* 
apt-get install -y $( cat debian/control | grep ^Build-Depends: | cut -d : -f2-200 | sed 's/([^)]*)//g' | sed 's/,//g' )
./configure $(cat debian/configure.options | grep -v '#' | xargs)
make depend
make
cd contrib/slapd-modules/smbk5pwd/
make
cp -a smbk5pwd.la .libs/smbk5pwd.so.0.0.0 .libs/smbk5pwd.so .libs/smbk5pwd.so.0 /usr/lib/ldap
chmod -x /usr/lib/ldap/smbk5pwd.so.0.0.0
chmod 644 /usr/lib/ldap/smbk5pwd.la /usr/lib/ldap/smbk5pwd.so /usr/lib/ldap/smbk5pwd.so.0 /usr/lib/ldap/smbk5pwd.so.0.0.0
cd /usr/src/
rm -rf openldap*
FICHER Makefile:
LIBTOOL=../../../libtool
OPT=-g -O2
CC=gcc

# Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
DEFS=-DDO_SAMBA

#HEIMDAL_INC=-I/usr/heimdal/include
HEIMDAL_INC=
SSL_INC=
LDAP_INC=-I../../../include -I../../../servers/slapd
INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)

#HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv
HEIMDAL_LIB=
SSL_LIB=-lcrypto
LDAP_LIB=-lldap_r -llber
LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)

all:    smbk5pwd.la


smbk5pwd.lo:    smbk5pwd.c
        $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?

smbk5pwd.la:    smbk5pwd.lo
        $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
        -rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS)
Ajouter la configuration au fichier /etc/ldap/slapd.conf
moduleload      smbk5pwd.so
...
...
database bdb
overlay smbk5pwd