]> git.sur5r.net Git - openldap/blob - doc/man/man8/slappasswd.8
b480d5ccfca11edb860616123aa79f589fac8ec6
[openldap] / doc / man / man8 / slappasswd.8
1 .TH SLAPPASSWD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2006 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slappasswd \- OpenLDAP password utility
7 .SH SYNOPSIS
8 .B SBINDIR/slappasswd
9 .B [\-v]
10 .B [\-u]
11 .B [\-g|\-s secret|\-T file]
12 .B [\-h hash]
13 .B [\-c salt-format]
14 .B 
15 .LP
16 .SH DESCRIPTION
17 .LP
18 .B Slappasswd
19 is used to generate an userPassword value
20 suitable for use with
21 .BR ldapmodify (1)
22 or
23 .BR slapd.conf (5)
24 .I rootpw
25 configuration directive.
26 .SH OPTIONS
27 .TP
28 .B \-v
29 enable verbose mode.
30 .TP
31 .B \-u
32 Generate RFC 2307 userPassword values (the default).  Future
33 versions of this program may generate alternative syntaxes
34 by default.  This option is provided for forward compatibility.
35 .TP
36 .BI \-s " secret"
37 The secret to hash.
38 If this,
39 .B \-g
40 and
41 .B \-T
42 are absent, the user will be prompted for the secret to hash.
43 .BR \-s ,
44 .B \-g
45 and
46 .B \-T
47 and mutually exclusive flags.
48 .TP
49 .BI \-g
50 Generate the secret.
51 If this,
52 .B \-s
53 and
54 .B \-T
55 are absent, the user will be prompted for the secret to hash.
56 .BR \-s ,
57 .B \-g
58 and
59 .B \-T
60 and mutually exclusive flags.
61 If this is present,
62 .I {CLEARTEXT}
63 is used as scheme.
64 .B \-g
65 and
66 .B \-h
67 are mutually exclusive flags.
68 .TP
69 .BI \-T " file"
70 Hash the contents of the file.
71 If this,
72 .B \-g
73 and
74 .B \-s
75 are absent, the user will be prompted for the secret to hash.
76 .BR \-s ,
77 .B \-g
78 and
79 .B \-T
80 and mutually exclusive flags.
81 .TP
82 .BI \-h " scheme"
83 If -h is specified, one of the following RFC 2307 schemes may
84 be specified:
85 .IR {CRYPT} ,
86 .IR {MD5} ,
87 .IR {SMD5} ,
88 .IR {SSHA} ", and"
89 .IR {SHA} .
90 The default is 
91 .IR {SSHA} .
92
93 Note that scheme names may need to be protected, due to
94 .B {
95 and
96 .BR } ,
97 from expansion by the user's command interpreter.
98
99 .B {SHA}
100 and
101 .B {SSHA}
102 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
103
104 .B {MD5}
105 and
106 .B {SMD5}
107 use the MD5 algorithm (RFC 1321), the latter with a seed.
108
109 .B {CRYPT}
110 uses the
111 .BR crypt (3).
112
113 .B {CLEARTEXT}
114 indicates that the new password should be added to userPassword as
115 clear text.
116 Unless
117 .I {CLEARTEXT}
118 is used, this flag is incompatible with
119 .BR \-g .
120 .TP
121 .BI \-c " crypt-salt-format"
122 Specify the format of the salt passed to
123 .BR crypt (3)
124 when generating {CRYPT} passwords.  
125 This string needs to be in
126 .BR sprintf (3)
127 format and may include one (and only one) %s conversion.
128 This conversion will be substituted with a string random
129 characters from [A\-Za\-z0\-9./].  For example, '%.2s'
130 provides a two character salt and '$1$%.8s' tells some
131 versions of crypt(3) to use an MD5 algorithm and provides
132 8 random characters of salt.  The default is '%s', which
133 provides 31 characters of salt.
134 .SH LIMITATIONS
135 The practice storing hashed passwords in userPassword violates
136 Standard Track (RFC 2256) schema specifications and may hinder
137 interoperability.  A new attribute type, authPassword, to hold
138 hashed passwords has been defined (RFC 3112), but is not yet
139 implemented in
140 .BR slapd (8).
141 .TP
142 It should also be noted that the behavior of
143 .BR crypt (3)
144 is platform specific.
145 .SH "SECURITY CONSIDERATIONS"
146 Use of hashed passwords does not protect passwords during
147 protocol transfer.  TLS or other eavesdropping protections
148 should be in\-place before using LDAP simple bind.
149 .TP
150 The hashed password values should be protected as if they
151 were clear text passwords.
152 .SH "SEE ALSO"
153 .BR ldappasswd (1),
154 .BR ldapmodify (1),
155 .BR slapd (8)
156 .BR slapd.conf (5)
157 .B RFC 2307
158 .B RFC 2256
159 .B RFC 3112
160 .LP
161 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
162 .SH ACKNOWLEDGEMENTS
163 OpenLDAP is developed and maintained by
164 The OpenLDAP Project (http://www.openldap.org/).
165 OpenLDAP is derived from University of Michigan LDAP 3.3 Release.