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]
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
27 mutually 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
31 mutually exclusive flags. If this is present, {CLEARTEXT} is
32 used 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
42 default 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
73 The practice of storing hashed passwords in userPassword violates Stan‐
74 dard Track (RFC 4519) schema specifications and may hinder interoper‐
75 ability. A new attribute type, authPassword, to hold hashed passwords
76 has been defined (RFC 3112), but is not yet implemented in slapd(8).
77
78 It should also be noted that the behavior of crypt(3) is platform spe‐
79 cific.
80
82 Use of hashed passwords does not protect passwords during protocol
83 transfer. TLS or other eavesdropping protections should be in-place
84 before using LDAP simple bind.
85
86 The hashed password values should be protected as if they were clear
87 text passwords.
88
90 ldappasswd(1), ldapmodify(1), slapd(8), slapd.conf(5), slapd-config(5),
91 RFC 2307, RFC 4519, RFC 3112
92
93 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
94
96 OpenLDAP Software is developed and maintained by The OpenLDAP Project
97 <http://www.openldap.org/>. OpenLDAP Software is derived from Univer‐
98 sity of Michigan LDAP 3.3 Release.
99
100
101
102OpenLDAP 2.4.23 2010/06/30 SLAPPASSWD(8C)