1SLAPPASSWD(8C) SLAPPASSWD(8C)
2
3
4
6 slappasswd - OpenLDAP password utility
7
9 /usr/sbin/slappasswd [-v] [-u] [-g|-s secret|-T file] [-h hash]
10 [-c salt-format] [-n] [-o option[=value]]
11
13 Slappasswd is used to generate an userPassword value suitable for use
14 with ldapmodify(1), slapd.conf(5) rootpw configuration directive or the
15 slapd-config(5) olcRootPW configuration directive.
16
18 -v enable verbose mode.
19
20 -u Generate RFC 2307 userPassword values (the default). Future
21 versions of this program may generate alternative syntaxes by
22 default. This option is provided for forward compatibility.
23
24 -s secret
25 The secret to hash. If this, -g and -T are absent, the user
26 will be prompted for the secret to hash. -s, -g and -T are mu‐
27 tually exclusive flags.
28
29 -g Generate the secret. If this, -s and -T are absent, the user
30 will be prompted for the secret to hash. -s, -g and -T are mu‐
31 tually exclusive flags. If this is present, {CLEARTEXT} is used
32 as scheme. -g and -h are mutually exclusive flags.
33
34 -T "file"
35 Hash the contents of the file. If this, -g and -s are absent,
36 the user will be prompted for the secret to hash. -s, -g and -T
37 and mutually exclusive flags.
38
39 -h "scheme"
40 If -h is specified, one of the following RFC 2307 schemes may be
41 specified: {CRYPT}, {MD5}, {SMD5}, {SSHA}, and {SHA}. The de‐
42 fault is {SSHA}.
43
44 Note that scheme names may need to be protected, due to { and },
45 from expansion by the user's command interpreter.
46
47 {SHA} and {SSHA} use the SHA-1 algorithm (FIPS 160-1), the lat‐
48 ter with a seed.
49
50 {MD5} and {SMD5} use the MD5 algorithm (RFC 1321), the latter
51 with a seed.
52
53 {CRYPT} uses the crypt(3).
54
55 {CLEARTEXT} indicates that the new password should be added to
56 userPassword as clear text. Unless {CLEARTEXT} is used, this
57 flag is incompatible with option -g.
58
59 -c crypt-salt-format
60 Specify the format of the salt passed to crypt(3) when generat‐
61 ing {CRYPT} passwords. This string needs to be in sprintf(3)
62 format and may include one (and only one) %s conversion. This
63 conversion will be substituted with a string of random charac‐
64 ters from [A-Za-z0-9./]. For example, '%.2s' provides a two
65 character salt and '$1$%.8s' tells some versions of crypt(3) to
66 use an MD5 algorithm and provides 8 random characters of salt.
67 The default is '%s', which provides 31 characters of salt.
68
69 -n Omit the trailing newline; useful to pipe the credentials into a
70 command.
71
72 -o option[=value]
73 Specify an option with a(n optional) value. Possible generic
74 options/values are:
75
76 module-path=<pathspec> (see `modulepath' in slapd.conf(5))
77 module-load=<filename> (see `moduleload' in slapd.conf(5))
78
79 You can load a dynamically loadable password hash module by
80 using this option.
81
83 The practice of storing hashed passwords in userPassword violates Stan‐
84 dard Track (RFC 4519) schema specifications and may hinder interoper‐
85 ability. A new attribute type, authPassword, to hold hashed passwords
86 has been defined (RFC 3112), but is not yet implemented in slapd(8).
87
88 It should also be noted that the behavior of crypt(3) is platform spe‐
89 cific.
90
92 Use of hashed passwords does not protect passwords during protocol
93 transfer. TLS or other eavesdropping protections should be in-place
94 before using LDAP simple bind.
95
96 The hashed password values should be protected as if they were clear
97 text passwords.
98
100 ldappasswd(1), ldapmodify(1), slapd(8), slapd.conf(5), slapd-config(5),
101 RFC 2307, RFC 4519, RFC 3112
102
103 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
104
106 OpenLDAP Software is developed and maintained by The OpenLDAP Project
107 <http://www.openldap.org/>. OpenLDAP Software is derived from the Uni‐
108 versity of Michigan LDAP 3.3 Release.
109
110
111
112OpenLDAP 2.4.57 2021/01/18 SLAPPASSWD(8C)