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