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