]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapcompare.1
Document -R
[openldap] / doc / man / man1 / ldapcompare.1
1 .TH LDAPCOMPARE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldapcompare \- LDAP compare tool
7 .SH SYNOPSIS
8 .B ldapcompare
9 [\c
10 .BR \-n ]
11 [\c
12 .BR \-v ]
13 [\c
14 .BR \-z ]
15 [\c
16 .BR \-k ]
17 [\c
18 .BR \-K ]
19 [\c
20 .BR \-M[M] ]
21 [\c
22 .BI \-d \ debuglevel\fR]
23 [\c
24 .BI \-D \ binddn\fR]
25 [\c
26 .BR \-W ]
27 [\c
28 .BI \-w \ passwd\fR]
29 [\c
30 .BI \-y \ passwdfile\fR]
31 [\c
32 .BI \-H \ ldapuri\fR]
33 [\c
34 .BI \-h \ ldaphost\fR]
35 [\c
36 .BI \-p \ ldapport\fR]
37 [\c
38 .BI \-P \ 2\fR\||\|\fI3\fR]
39 [\c
40 .BR \-O \ security-properties ]
41 [\c
42 .BR \-I ]
43 [\c
44 .BR \-Q ]
45 [\c
46 .BI \-U \ authcid\fR]
47 [\c
48 .BI \-R \ realm\fR]
49 [\c
50 .BR \-x ]
51 [\c
52 .BI \-X \ authzid\fR]
53 [\c
54 .BI \-Y \ mech\fR]
55 [\c
56 .BR \-Z[Z] ]
57 .IR DN \ <
58 .BR attr:value \ |
59 .BR attr::b64value \ >
60 .SH DESCRIPTION
61 .I ldapcompare
62 is a shell-accessible interface to the
63 .BR ldap_compare (3)
64 library call.
65 .LP
66 .B ldapcompare
67 opens a connection to an LDAP server, binds, and performs a compare
68 using specified parameters.   The \fIDN\fP should be a distinguished
69 name in the directory.  \fIAttr\fP should be a known attribute.  If
70 followed by one colon, the assertion \fIvalue\fP should be provided
71 as a string.  If followed by two colons, the base64 encoding of the
72 value is provided.
73 .LP
74 .SH OPTIONS
75 .TP
76 .B \-n
77 Show what would be done, but don't actually perform the compare.  Useful for
78 debugging in conjunction with -v.
79 .TP
80 .B \-v
81 Run in verbose mode, with many diagnostics written to standard output.
82 .TP
83 .B \-z
84 Run in quiet mode, no output is written.  You must check the return
85 status.  Useful in shell scripts.
86 .TP
87 .B \-k
88 Use Kerberos IV authentication instead of simple authentication.  It is
89 assumed that you already have a valid ticket granting ticket.
90 .B ldapcompare
91 must be compiled with Kerberos support for this option to have any effect.
92 .TP
93 .B \-K
94 Same as \-k, but only does step 1 of the Kerberos IV bind.  This is useful
95 when connecting to a slapd and there is no x500dsa.hostname principal
96 registered with your Kerberos Domain Controller(s).
97 .TP
98 .B \-M[M]
99 Enable manage DSA IT control.
100 .B \-MM
101 makes control critical.
102 .TP
103 .BI \-d \ debuglevel
104 Set the LDAP debugging level to \fIdebuglevel\fP.
105 .B ldapcompare
106 must be compiled with LDAP_DEBUG defined for this option to have any effect.
107 .TP
108 .B \-x 
109 Use simple authentication instead of SASL.
110 .TP
111 .BI \-D \ binddn
112 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
113 .TP
114 .B \-W
115 Prompt for simple authentication.
116 This is used instead of specifying the password on the command line.
117 .TP
118 .BI \-w \ passwd
119 Use \fIpasswd\fP as the password for simple authentication.
120 .TP
121 .BI \-y \ passwdfile
122 Use complete contents of \fIpasswdfile\fP as the password for
123 simple authentication.
124 .TP
125 .BI \-H \ ldapuri
126 Specify URI(s) referring to the ldap server(s).
127 .TP
128 .BI \-h \ ldaphost
129 Specify an alternate host on which the ldap server is running.
130 Deprecated in favor of -H.
131 .TP
132 .BI \-p \ ldapport
133 Specify an alternate TCP port where the ldap server is listening.
134 Deprecated in favor of -H.
135 .TP
136 .BI \-P \ 2\fR\||\|\fI3
137 Specify the LDAP protocol version to use.
138 .TP
139 .BI \-O \ security-properties
140 Specify SASL security properties.
141 .TP
142 .B \-I
143 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
144 only as needed.
145 .TP
146 .B \-Q
147 Enable SASL Quiet mode.  Never prompt.
148 .TP
149 .BI \-U \ authcid
150 Specify the authentication ID for SASL bind. The form of the ID
151 depends on the actual SASL mechanism used.
152 .TP
153 .BI \-R \ realm
154 Specify the realm of authentication ID for SASL bind. The form of the realm
155 depends on the actual SASL mechanism used.
156 .TP
157 .BI \-X \ authzid
158 Specify the requested authorization ID for SASL bind.
159 .I authzid
160 must be one of the following formats:
161 .B dn:\c
162 .I <distinguished name>
163 or
164 .B u:\c
165 .I <username>
166 .TP
167 .BI \-Y \ mech
168 Specify the SASL mechanism to be used for authentication. If it's not
169 specified, the program will choose the best mechanism the server knows.
170 .TP
171 .B \-Z[Z]
172 Issue StartTLS (Transport Layer Security) extended operation. If you use
173 .B \-ZZ\c
174 , the command will require the operation to be successful.
175 .SH EXAMPLE
176 .nf
177     ldapcompare "uid=babs,dc=example,dc=com"  sn Jensen
178     ldapcompare "uid=babs,dc=example,dc=com"  sn:Jensen
179     ldapcompare "uid=babs,dc=example,dc=com"  sn::SmVuc2Vu
180 .fi
181 are all equivalent.
182 .SH DIAGNOSTICS
183 When -z is used, exit status is either 5 if the compare is false, or 6
184 when the compare is true.  Errors result in other non-zero values.
185 .br
186 When -z is not used, exit status is zero if no errors occur.
187 Errors result in a non-zero exit status and
188 a diagnostic message being written to standard error.
189 .SH BUGS
190 Should have a way to specify a url for options or for large binary
191 file compares.
192 .SH "SEE ALSO"
193 .BR ldap.conf (5),
194 .BR ldif (5),
195 .BR ldap (3),
196 .BR ldap_compare (3)
197 .SH AUTHOR
198 The OpenLDAP Project <http://www.openldap.org/>
199 .SH ACKNOWLEDGEMENTS
200 .B      OpenLDAP
201 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
202 .B      OpenLDAP
203 is derived from University of Michigan LDAP 3.3 Release.