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