SLAPD-PW-SHA2(5)
π SLAPD-PW-SHA2 π
okay bestie, so this is slapd-pw-sha2 β the SHA-2 password module for slapd. it lives in the File Formats Manual section of the OpenLDAP world, and it's genuinely so cute and useful. let's get into it π«Ά
β¨ NAME β¨
slapd-pw-sha2 β SHA-2 password module to slapd
β¨ SYNOPSIS β¨
ETCDIR/slapd.conf
moduleload pw-sha2
πΈ DESCRIPTION πΈ
so the pw-sha2 module is a little add-on for slapd(8), and what it does is let OpenLDAP use the SHA-2 family of hash functions (FIPS 180-2) in hashed passwords. we're talking SSHA-512, SSHA-384, SSHA-256, SHA-512, SHA-384 and SHA-256. iconic lineup tbh π
and how does it do that? by handing slapd these extra password schemes to play with:
{SSHA256}β SHA-256 with salt, giving hash values of 256 bits length{SHA256}β plain SHA-256, giving hash values of 256 bits length{SSHA384}β SHA-384 with salt, giving hash values of 384 bits length{SHA384}β plain SHA-384, giving hash values of 384 bits length{SSHA512}β SHA-512 with salt, giving hash values of 512 bits length{SHA512}β plain SHA-512, giving hash values of 512 bits length
no cap, that's the whole menu. π
π CONFIGURATION π
okay here's the best part: the pw-sha2 module does not need any configuration. zero. nada. she's low maintenance π
once you've loaded the module, the password schemes {SSHA256}, {SSHA384}, {SSHA512}, {SSHA256}, {SHA384}, and {SHA512} will be recognised in values of the userPassword attribute. (yes bestie, read that list again, that's what it says β¨)
after that you can tell OpenLDAP to actually use these schemes when it's processing the LDAPv3 Password Modify (RFC 3062) extended operations β you do that with the password-hash option in slapd.conf(5). main character energy fr fr π
π¦ NOTES π¦
if you wanna use the schemes described here with slappasswd(8), do not forget to load the module using its command line options. the relevant option/value combo is:
-o module-load=pw-sha2
and depending on where pw-sha2 is chillin' on your system, you might also need:
-o module-path=pathspec
π EXAMPLES π
every single one of the userPassword LDAP attributes below encodes the password 'secret'. yes, literally all of them. same password, different glow-up β¨
userPassword: {SHA512}vSsar3708Jvp9Szi2NWZZ02Bqp1qRCFpbcTZPdBhnWgs5WtNZKnvCXdhztmeD2cmW192CF5bDufKRpayrW/isg==
userPassword: {SHA384}WKd1ukESvjAFrkQHznV9iP2nHUBJe7gCbsrFTU4//HIyzo3jq1rLMK45dg/ufFPt
userPassword: {SHA256}K7gNU3sdo+OL0wNhqoVWhr3g6s1xYv72ol/pe/Unols=
and if you want {SSHA512} to be the password hash used in Password Modify extended operations, you literally just set this line in slapd.conf(5):
password-hash {SSHA512}
done. slay. π
π SEE ALSO π
slapd.conf(5)ldappasswd(1)slappasswd(8)ldap(3)- "OpenLDAP Administrator's Guide" (
http://www.OpenLDAP.org/doc/admin/)
π ACKNOWLEDGEMENTS π
this manual page has been written by Peter Marschall based on the module's README file written by Jeff Turner. legends, both of them π«Ά
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release.
and that's the whole page bestie!! tysm for reading, mwah π
β¨ this page is from OpenLDAP, version LDVERSION, released RELEASEDATE, and it belongs to the slapd-pw-sha2(5) manual β go forth and hash responsibly β¨ π¦ππ
π¦ where this page comes from
- alpine 3.23: openldap-doc 2.6.13-r0 Β· OLDAP-2.8
- alpine 3.24: openldap-doc 2.6.15-r0 Β· OLDAP-2.8
- arch rolling: openldap 2.7.1-1
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- nixos 26.05: openldap 2.6.13
- nixpkgs unstable: openldap 2.6.13
- opensuse-leap 16.0: openldap2_6 2.6.13+157-160000.1.1 Β· OLDAP-2.8
- opensuse-leap 16.0: openldap2_6 2.6.13+157-160000.1.1 Β· OLDAP-2.8
- opensuse-leap 16.0: openldap2_6 2.6.13+157-160000.1.1 Β· OLDAP-2.8
- opensuse-leap 16.0: openldap2_6 2.6.13+157-160000.1.1 Β· OLDAP-2.8
- ubuntu stonking: slapd 2.6.13+dfsg-1ubuntu3 Β· OpenLDAP-2.8
- Copyright 2015-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms