SLAPPASSWD(8C)
π SLAPPASSWD(8C) β slappasswd, bestie edition π
okay so welcome to the manual page for slappasswd, from the 8C section. it's the OpenLDAP password utility and honestly? it's giving "small tool, big job." let's get into it π«Ά
β¨ NAME β¨
slappasswd β the OpenLDAP password utility, aka the little guy who makes your password hash for you π
πΈ SYNOPSIS πΈ
/usr/bin/slappasswd [-v] [-u] [-g|-s secret|-T file] [-h hash] [-c salt-
format] [-n] [-o option[=value]]
(yeah the salt-format wraps onto the next line, that's just the terminal being dramatic, don't panic π)
π¦ DESCRIPTION π¦
so what does this thing do? it generates a userPassword value, and that value is ready to go straight into:
ldapmodify(1)- the
rootpwconfiguration directive inslapd.conf(5) - the
olcRootPWconfiguration directive inslapd-config(5)
that's the whole vibe. you give it a secret, it gives you a hash, you go put that hash somewhere. iconic, honestly β¨
π OPTIONS π
-vβ turns on verbose mode. it will talk to you. let it yap π¬-uβ generates RFC 2307userPasswordvalues, and this is the default, so it's already doing this. future versions of this program may generate alternative syntaxes by default, and this option exists purely for forward compatibility. so basically it's a reassurance flag π«Ά-ssecret β the actual secret you want hashed. if this,-gand-Tare all absent, the user gets prompted for the secret to hash. also:-s,-gand-Tare mutually exclusive flags, you can't run all three, pick one bestie π-gβ generate the secret. if this,-sand-Tare absent, the user will be prompted for the secret to hash.-s,-gand-Tare mutually exclusive flags. if this one is present,{CLEARTEXT}is used as the scheme. also-gand-hare mutually exclusive flags, so don't try it π«-T"file" β hash the contents of the file. if this,-gand-sare absent, the user will be prompted for the secret to hash.-s,-gand-Tare mutually exclusive flags. (the original literally says "and mutually exclusive flags" instead of "are", we love a typo moment, but the meaning is loud and clear π)-h"scheme" β if-his specified, one of these RFC 2307 schemes may be specified:{CRYPT},{MD5},{SMD5},{SSHA}, and{SHA}. the default is{SSHA}.
heads up: scheme names may need to be protected from expansion by the user's command interpreter, because of the{and}characters. quote them, please, for your own sake π
here's the scheme tea β:
{SHA}and{SSHA}use the SHA-1 algorithm (FIPS 160-1), and the latter uses a seed.{MD5}and{SMD5}use the MD5 algorithm (RFC 1321), and the latter uses a seed.{CRYPT}usescrypt(3).{CLEARTEXT}indicates that the new password should be added touserPasswordas clear text. unless{CLEARTEXT}is used, this flag is incompatible with option-g.
-ccrypt-salt-format β specifies the format of the salt passed tocrypt(3)when generating{CRYPT}passwords. this string has to be insprintf(3)format and may include one (and only one π)%sconversion. that conversion gets substituted with a string of random characters from[A-Za-z0-9./]. for example,'%.2s'gives you a two character salt, and'$1$%.8s'tells some versions ofcrypt(3)to use an MD5 algorithm and provides 8 random characters of salt. the default is'%s', which provides 31 characters of salt. no cap, that's a lot of salt π§β¨-nβ omits the trailing newline. useful for piping the credentials into a command. shell girlies stay winning π₯-ooption[=value] β specify an option with a(n optional) value. the possible generic options/values are:
module-path=<pathspec> (see `modulepath' in slapd.conf(5))
module-load="<filename> [<arguments>...]" (see `moduleload' in slapd.conf(5))
you can load a dynamically loadable password hash module by using this option. plug in modules, glow up your hashing π
π LIMITATIONS π
the practice of storing hashed passwords in userPassword violates Standard Track (RFC 4519) schema specifications and may hinder interoperability. a new attribute type, authPassword, to hold hashed passwords has been defined (RFC 3112), but it is not yet implemented in slapd(8). so like, the better thing exists but it's not here yet. tragic.
also it should be noted that the behavior of crypt(3) is platform specific. so what slays on one machine might do something completely different on another π
π SECURITY CONSIDERATIONS π
okay this is the serious part, pay attention bestie:
use of hashed passwords does not protect passwords during protocol transfer. TLS or other eavesdropping protections should be in-place before using LDAP simple bind. like, please, turn on TLS, i am begging π
and the hashed password values should be protected as if they were clear text passwords. yes really. treat your hash like it's the actual password, because that's the energy it deserves π
π SEE ALSO π
ldappasswd(1),ldapmodify(1),slapd(8),slapd.conf(5),slapd-config(5)- RFC 2307, RFC 4519, RFC 3112
- "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
go read those, iykyk π
π«Ά ACKNOWLEDGEMENTS π«Ά
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release. shoutout to the University of Michigan LDAP 3.3 Release, you're the blueprint periodt π
and that's the whole page, bestie π this was OpenLDAP 2.7.2, dated 2026/10/21, and you just read SLAPPASSWD(8C). go hash something cute and protect your secrets, mwah π
πβ¨
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 1998-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