mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
17.54.2014 dab677b887c19f49a0e298f80f55c9ef8d81a85b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
'\" t
.\"     Title: ldapcompare
.\"    Author: 
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 03/01/2013
.\"    Manual: Tools Reference
.\"    Source: OpenDJ 2.5.0
.\"  Language: English
.\"
.TH "LDAPCOMPARE" "1" "03/01/2013" "OpenDJ 2\&.5\&.0" "Tools Reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ldapcompare \- perform LDAP compare operations
.SH "SYNOPSIS"
.HP \w'\fBldapcompare\fR\ 'u
\fBldapcompare\fR {options} [[attribute] | [:] | [value]] [DN...]
.SH "DESCRIPTION"
.PP
This utility can be used to perform LDAP compare operations in the directory\&.
.SH "OPTIONS"
.PP
The following options are supported\&.
.PP
\fB\-\-assertionFilter {filter}\fR
.RS 4
Use the LDAP assertion control with the provided filter
.RE
.PP
\fB\-c, \-\-continueOnError\fR
.RS 4
Continue processing even if there are errors
.RE
.PP
\fB\-f, \-\-filename {file}\fR
.RS 4
LDIF file containing one DN per line of entries to compare
.RE
.PP
\fB\-J, \-\-control {controloid[:criticality[:value|::b64value|:<filePath]]}\fR
.RS 4
Use a request control with the provided information
.RE
.PP
\fB\-m, \-\-useCompareResultCode\fR
.RS 4
Use the LDAP compare result as an exit code for the LDAP compare operations\&.
.RE
.PP
\fB\-n, \-\-dry\-run\fR
.RS 4
Show what would be done but do not perform any operation
.RE
.SS "LDAP Connection Options"
.PP
\fB\-\-connectTimeout {timeout}\fR
.RS 4
Maximum length of time (in milliseconds) that can be taken to establish a connection\&. Use \*(Aq0\*(Aq to specify no time out\&.
.sp
Default value: 30000
.RE
.PP
\fB\-D, \-\-bindDN {bindDN}\fR
.RS 4
DN to use to bind to the server
.sp
Default value: cn=Directory Manager
.RE
.PP
\fB\-h, \-\-hostname {host}\fR
.RS 4
Directory server hostname or IP address
.sp
Default value: localhost\&.localdomain
.RE
.PP
\fB\-j, \-\-bindPasswordFile {bindPasswordFile}\fR
.RS 4
Bind password file
.RE
.PP
\fB\-K, \-\-keyStorePath {keyStorePath}\fR
.RS 4
Certificate key store path
.RE
.PP
\fB\-N, \-\-certNickname {nickname}\fR
.RS 4
Nickname of certificate for SSL client authentication
.RE
.PP
\fB\-o, \-\-saslOption {name=value}\fR
.RS 4
SASL bind options
.RE
.PP
\fB\-p, \-\-port {port}\fR
.RS 4
Directory server port number
.sp
Default value: 389
.RE
.PP
\fB\-P, \-\-trustStorePath {trustStorePath}\fR
.RS 4
Certificate trust store path
.RE
.PP
\fB\-q, \-\-useStartTLS\fR
.RS 4
Use StartTLS to secure communication with the server
.RE
.PP
\fB\-r, \-\-useSASLExternal\fR
.RS 4
Use the SASL EXTERNAL authentication mechanism
.RE
.PP
\fB\-\-trustStorePassword {trustStorePassword}\fR
.RS 4
Certificate trust store PIN
.RE
.PP
\fB\-u, \-\-keyStorePasswordFile {keyStorePasswordFile}\fR
.RS 4
Certificate key store PIN file
.RE
.PP
\fB\-U, \-\-trustStorePasswordFile {path}\fR
.RS 4
Certificate trust store PIN file
.RE
.PP
\fB\-V, \-\-ldapVersion {version}\fR
.RS 4
LDAP protocol version number
.sp
Default value: 3
.RE
.PP
\fB\-w, \-\-bindPassword {bindPassword}\fR
.RS 4
Password to use to bind to the server
.RE
.PP
\fB\-W, \-\-keyStorePassword {keyStorePassword}\fR
.RS 4
Certificate key store PIN
.RE
.PP
\fB\-X, \-\-trustAll\fR
.RS 4
Trust all server SSL certificates
.RE
.PP
\fB\-Z, \-\-useSSL\fR
.RS 4
Use SSL for secure communication with the server
.RE
.SS "Utility Input/Output Options"
.PP
\fB\-i, \-\-encoding {encoding}\fR
.RS 4
Use the specified character set for command\-line input
.RE
.PP
\fB\-\-noPropertiesFile\fR
.RS 4
No properties file will be used to get default command line argument values
.RE
.PP
\fB\-\-propertiesFilePath {propertiesFilePath}\fR
.RS 4
Path to the file containing default property values used for command line arguments
.RE
.PP
\fB\-s, \-\-script\-friendly\fR
.RS 4
Use script\-friendly mode
.RE
.PP
\fB\-v, \-\-verbose\fR
.RS 4
Use verbose mode
.RE
.SS "General Options"
.PP
\fB\-\-version\fR
.RS 4
Display version information
.RE
.PP
\fB\-?, \-H, \-\-help\fR
.RS 4
Display usage information
.RE
.SH "EXIT CODES"
.PP
0
.RS 4
The command completed successfully\&.
.RE
.PP
5
.RS 4
The \-m option was used, and at least one of the LDAP compare operations did not match\&.
.RE
.PP
6
.RS 4
The \-m option was used, and all the LDAP compare operations did match\&.
.RE
.PP
\fIldap\-error\fR
.RS 4
An LDAP error occurred while processing the operation\&.
.sp
LDAP result codes are described in
\m[blue]\fBRFC 4511\fR\m[]\&. Also see the additional information for details\&.
.RE
.PP
89
.RS 4
An error occurred while parsing the command\-line arguments\&.
.RE
.SH "FILES"
.PP
You can use
~/\&.opendj/tools\&.properties
to set the defaults for bind DN, host name, and port number as in the following example\&.
.sp
.if n \{\
.RS 4
.\}
.nf
hostname=directory\&.example\&.com
port=1389
bindDN=uid=kvaughan,ou=People,dc=example,dc=com
 
ldapcompare\&.port=1389
ldapdelete\&.port=1389
ldapmodify\&.port=1389
ldappasswordmodify\&.port=1389
ldapsearch\&.port=1389
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLES"
.PP
The following examples demonstrate comparing Babs Jensen\*(Aqs UID\&.
.PP
The following example uses a matching UID value\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ ldapcompare \-p 1389 uid:bjensen uid=bjensen,ou=people,dc=example,dc=com
Comparing type uid with value bjensen in entry
uid=bjensen,ou=people,dc=example,dc=com
Compare operation returned true for entry
uid=bjensen,ou=people,dc=example,dc=com
.fi
.if n \{\
.RE
.\}
.PP
The following example uses a UID value that does not match\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ ldapcompare \-p 1389 uid:beavis uid=bjensen,ou=people,dc=example,dc=com
Comparing type uid with value beavis in entry
uid=bjensen,ou=people,dc=example,dc=com
Compare operation returned false for entry
uid=bjensen,ou=people,dc=example,dc=com
.fi
.if n \{\
.RE
.\}
.SH "COPYRIGHT"
.br
Copyright \(co 2011-2013 ForgeRock AS
.br