ldap - SSHA password encryption on OpenLDAP -
my current problem cannot stop openldap store passwords plaintext. in older openldap version , entered following configuration in slapd.conf
ppolicy_hash_cleartext password-hash {ssha} {sha}
so once password sent application plaintext, ldap encrypting , storing encrypted.
unfortunately not able configure openldap 2.4.40. found out slapd.conf not exist anymore in newer version , instead configuration taking place in cn=config.ldif file.
i tried add again same configuration there seems has no effect.
edit : added ldapmodify olcpasswordhash: {ssha} entry in olcbackend={0}mdb.ldif , olcdatabase={1}mdb.ldif , olcdatabase={0}config.ldif , cn=config.ldif , still passwords sent plaintext stored plaintext.
took time, figured out finally.
load schema describing ppolicy attributes.
ldapadd -y external -h ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
create ppolicy_module.ldif following content , make sure ppolicy.la located under defined olcmodulepath. store file under /etc/ldap
dn: cn=module,cn=config objectclass: olcmodulelist cn: module olcmoduleload: ppolicy.la olcmodulepath: /usr/lib/ldap
add ppolicy_module.ldif
ldapadd -y external -h ldapi:/// -f ppolicy_module.ldif
create ppolicy-overlay.ldif file following content. make sure of olcdatabase number . in case olcdatabase={1}mdb . store file under /etc/ldap
dn: olcoverlay=ppolicy,olcdatabase={1}mdb,cn=config objectclass: olcppolicyconfig olcoverlay: ppolicy olcppolicydefault: cn=ppolicy,ou=policies,dc=example,dc=com olcppolicyuselockout: false olcppolicyhashcleartext: true
add ldif file.
ldapadd -y external -h ldapi:/// -f ./ppolicy-overlay.ldif
restart ldap.
more details under: https://fedorahosted.org/sssd/wiki/openldap_ppolicy
Comments
Post a Comment