check-password is an example ppolicy module used to enforce strong password checks in OpenLDAP
-
Download the appropriate source code package for your system from the OpenLDAP website.
-
Extract it on the target machine and use OpenLDAP’s Makefile to generate the required headers:
tar xf openldap-*.tgz
cd opendalp*
make depend- Now enter the check-password module directory and run
make, passing the OpenLDAP source code path through theLDAP_SRCvariable. For example:
LDAP_SRC=/home/myuser/openldap-2.4.40 makeYou may also want to configure the module destination path and the configuration file path together with the make invocation:
DEST=/usr/lib/ldap/modules CONF_FILE_PATH=/etc/ldap/check_password.conf LDAP_SRC=/home/myuser/openldap-2.4.40 makemake install- Configure basic options in the config file specified by the
CONF_FILE_PATHvariable. - Set the
pwdCheckQualityattribute in ppolicy to either 1 or 2. - Set the
pwdCheckModuleattribute to the path of the module file (.so).