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