1 .TH LDAPCOMPARE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2013 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldapcompare \- LDAP compare tool
12 .BI \-d \ debuglevel\fR]
30 .BI \-y \ passwdfile\fR]
34 .BI \-h \ ldaphost\fR]
36 .BI \-p \ ldapport\fR]
38 .BR \-P \ { 2 \||\| 3 }]
40 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
42 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
44 .BI \-o \ opt \fR[= optparam \fR]]
46 .BI \-O \ security-properties\fR]
67 .BI attr:: b64value\fR}
70 is a shell-accessible interface to the
71 .BR ldap_compare_ext (3)
75 opens a connection to an LDAP server, binds, and performs a compare
76 using specified parameters. The \fIDN\fP should be a distinguished
77 name in the directory. \fIAttr\fP should be a known attribute. If
78 followed by one colon, the assertion \fIvalue\fP should be provided
79 as a string. If followed by two colons, the base64 encoding of the
80 value is provided. The result code of the compare is provided as
81 the exit code and, unless ran with \fB\-z\fP, the program prints
82 TRUE, FALSE, or UNDEFINED on standard output.
88 If \fB\-VV\fP is given, only the version information is printed.
91 Set the LDAP debugging level to \fIdebuglevel\fP.
93 must be compiled with LDAP_DEBUG defined for this option to have any effect.
96 Show what would be done, but don't actually perform the compare. Useful for
97 debugging in conjunction with \fB\-v\fP.
100 Run in verbose mode, with many diagnostics written to standard output.
103 Run in quiet mode, no output is written. You must check the return
104 status. Useful in shell scripts.
107 Enable manage DSA IT control.
109 makes control critical.
112 Use simple authentication instead of SASL.
115 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
116 For SASL binds, the server is expected to ignore this value.
119 Prompt for simple authentication.
120 This is used instead of specifying the password on the command line.
123 Use \fIpasswd\fP as the password for simple authentication.
126 Use complete contents of \fIpasswdfile\fP as the password for
127 simple authentication.
128 Note that \fIcomplete\fP means that any leading or trailing whitespaces,
129 including newlines, will be considered part of the password and,
130 unlike other software, they will not be stripped.
131 As a consequence, passwords stored in files by commands like
133 will not behave as expected, since
135 by default appends a trailing newline to the echoed string.
136 The recommended portable way to store a cleartext password in a file
137 for use with this option is to use
139 with \fI{CLEARTEXT}\fP as hash and the option \fB\-n\fP.
142 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
143 fields are allowed; a list of URI, separated by whitespace or commas
147 Specify an alternate host on which the ldap server is running.
148 Deprecated in favor of \fB\-H\fP.
151 Specify an alternate TCP port where the ldap server is listening.
152 Deprecated in favor of \fB\-H\fP.
154 .BR \-P \ { 2 \||\| 3 }
155 Specify the LDAP protocol version to use.
157 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
159 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
161 Specify general extensions with \fB\-e\fP and compare extensions with \fB\-E\fP.
162 \'\fB!\fP\' indicates criticality.
166 [!]assert=<filter> (an RFC 4515 Filter)
167 !authzid=<authzid> ("dn:<dn>" or "u:<user>")
168 [!]bauthzid (RFC 3829 authzid control)
169 [!]chaining[=<resolve>[/<cont>]]
173 [!]postread[=<attrs>] (a comma-separated attribute list)
174 [!]preread[=<attrs>] (a comma-separated attribute list)
176 sessiontracking[=<username>]
177 abandon,cancel,ignore (SIGINT sends abandon/cancel,
178 or ignores response; if critical, doesn't wait for SIGINT.
187 .BI \-o \ opt \fR[= optparam \fR]
189 Specify general options.
193 nettimeout=<timeout> (in seconds, or "none" or "max")
194 ldif-wrap=<width> (in columns, or "no" for no wrapping)
197 .BI \-O \ security-properties
198 Specify SASL security properties.
201 Enable SASL Interactive mode. Always prompt. Default is to prompt
205 Enable SASL Quiet mode. Never prompt.
208 Do not use reverse DNS to canonicalize SASL host name.
211 Specify the authentication ID for SASL bind. The form of the ID
212 depends on the actual SASL mechanism used.
215 Specify the realm of authentication ID for SASL bind. The form of the realm
216 depends on the actual SASL mechanism used.
219 Specify the requested authorization ID for SASL bind.
221 must be one of the following formats:
222 .BI dn: "<distinguished name>"
227 Specify the SASL mechanism to be used for authentication. If it's not
228 specified, the program will choose the best mechanism the server knows.
231 Issue StartTLS (Transport Layer Security) extended operation. If you use
232 \fB\-ZZ\fP, the command will require the operation to be successful.
235 ldapcompare "uid=babs,dc=example,dc=com" sn:Jensen
236 ldapcompare "uid=babs,dc=example,dc=com" sn::SmVuc2Vu
240 Requiring the value be passed on the command line is limiting
241 and introduces some security concerns. The command should support
242 a mechanism to specify the location (file name or URL) to read
248 .BR ldap_compare_ext (3)
250 The OpenLDAP Project <http://www.openldap.org/>