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