The ppm module is an extension for the OpenLDAP password policy overlay (slapo-ppolicy) that checks password quality based on character classes and other criteria during password modification.
Setup Requirements
- Enable the
ppolicy overlay in your database. - Define a default password policy in your OpenLDAP configuration or use the
pwdPolicySubentry attribute to point to a specific policy.
Configuration by OpenLDAP Version
OpenLDAP 2.6+
Use the ppolicy_check_module parameter in your slapd.conf or cn=config to point to the ppm.so library. The policy configuration itself is stored in the pwdCheckModuleArg attribute of the password policy entry. This attribute must contain a base64 encoded version of your configuration text.
slapd.conf example:
overlay ppolicy
ppolicy_default "cn=default,ou=policies,dc=my-domain,dc=com"
ppolicy_check_module /usr/local/openldap/libexec/openldap/ppm.so
LDIF example (cn=config):
dn: cn=default,ou=policies,dc=my-domain,dc=com
objectClass: pwdPolicy
objectClass: top
objectClass: pwdPolicyChecker
objectClass: person
pwdCheckQuality: 2
pwdAttribute: userPassword
sn: default
cn: default
pwdMinLength: 6
pwdCheckModuleArg:: bWluUXVhbGl0eSAzCmNoZWNrUkROIDAKY2hlY2tBdHRyaWJ1dGVzCmZvcmJpZGRlbkNoYXJzCm1heENvbnNlY3V0aXZlUGVyQ2xhc3MgMAp1c2VDcmFja2xpYiAwCmNyYWNrbGliRGljdCAvdmFyL2NhY2hlL2NyYWNrbGliL2NyYWNrbGliX2RpY3QKY2xhc3MtdXBwZXJDYXNlIEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaIDAgMSAwCmNsYXNzLWxvd2VyQ2FzZSBhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eiAwIDEgMApjbGFzcy1kaWdpdCAwMTIzNDU2Nzg5IDAgMSAwCmNsYXNzLXNwZWNpYWwgPD4sPzsuOi8hwqfDuSUqwrVewqgkwqPCsibDqX4iIyd7KFstfMOoYF9cw6dew6BAKV3CsD19KyAwIDEgMAoK
pwdUseCheckModule: TRUE
OpenLDAP 2.5
Add a pwdCheckModule attribute to your password policy entry pointing to the path of the ppm.so library (e.g., /usr/local/lib/ppm.so). Do not use the pwdUseCheckModule attribute.
Note: Remove the ppolicy_check_module parameter from slapd.conf in version 2.5, as it is managed within the password policy definition.
overlay ppolicy
ppolicy_default "cn=default,ou=policies,dc=my-domain,dc=com"
ppolicy_check_module /usr/local/openldap/libexec/openldap/ppm.so