]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapcompare.1
clarify what can appear after -H
[openldap] / doc / man / man1 / ldapcompare.1
1 .TH LDAPCOMPARE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2005 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.  The result code of the compare is provided as
73 the exit code and, unless ran with -z, the program prints
74 TRUE, FALSE, or UNDEFINED on standard output.
75 .LP
76 .SH OPTIONS
77 .TP
78 .B \-n
79 Show what would be done, but don't actually perform the compare.  Useful for
80 debugging in conjunction with -v.
81 .TP
82 .B \-v
83 Run in verbose mode, with many diagnostics written to standard output.
84 .TP
85 .B \-z
86 Run in quiet mode, no output is written.  You must check the return
87 status.  Useful in shell scripts.
88 .TP
89 .B \-k
90 Use Kerberos IV authentication instead of simple authentication.  It is
91 assumed that you already have a valid ticket granting ticket.
92 .B ldapcompare
93 must be compiled with Kerberos support for this option to have any effect.
94 .TP
95 .B \-K
96 Same as \-k, but only does step 1 of the Kerberos IV bind.  This is useful
97 when connecting to a slapd and there is no x500dsa.hostname principal
98 registered with your Kerberos Domain Controller(s).
99 .TP
100 .B \-M[M]
101 Enable manage DSA IT control.
102 .B \-MM
103 makes control critical.
104 .TP
105 .BI \-d \ debuglevel
106 Set the LDAP debugging level to \fIdebuglevel\fP.
107 .B ldapcompare
108 must be compiled with LDAP_DEBUG defined for this option to have any effect.
109 .TP
110 .B \-x 
111 Use simple authentication instead of SASL.
112 .TP
113 .BI \-D \ binddn
114 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
115 .TP
116 .B \-W
117 Prompt for simple authentication.
118 This is used instead of specifying the password on the command line.
119 .TP
120 .BI \-w \ passwd
121 Use \fIpasswd\fP as the password for simple authentication.
122 .TP
123 .BI \-y \ passwdfile
124 Use complete contents of \fIpasswdfile\fP as the password for
125 simple authentication.
126 .TP
127 .BI \-H \ ldapuri
128 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
129 fields are allowed; a list of URI, separated by whitespace or commas
130 is expected.
131 .TP
132 .BI \-h \ ldaphost
133 Specify an alternate host on which the ldap server is running.
134 Deprecated in favor of -H.
135 .TP
136 .BI \-p \ ldapport
137 Specify an alternate TCP port where the ldap server is listening.
138 Deprecated in favor of -H.
139 .TP
140 .BI \-P \ 2\fR\||\|\fI3
141 Specify the LDAP protocol version to use.
142 .TP
143 .BI \-O \ security-properties
144 Specify SASL security properties.
145 .TP
146 .B \-I
147 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
148 only as needed.
149 .TP
150 .B \-Q
151 Enable SASL Quiet mode.  Never prompt.
152 .TP
153 .BI \-U \ authcid
154 Specify the authentication ID for SASL bind. The form of the ID
155 depends on the actual SASL mechanism used.
156 .TP
157 .BI \-R \ realm
158 Specify the realm of authentication ID for SASL bind. The form of the realm
159 depends on the actual SASL mechanism used.
160 .TP
161 .BI \-X \ authzid
162 Specify the requested authorization ID for SASL bind.
163 .I authzid
164 must be one of the following formats:
165 .B dn:\c
166 .I <distinguished name>
167 or
168 .B u:\c
169 .I <username>
170 .TP
171 .BI \-Y \ mech
172 Specify the SASL mechanism to be used for authentication. If it's not
173 specified, the program will choose the best mechanism the server knows.
174 .TP
175 .B \-Z[Z]
176 Issue StartTLS (Transport Layer Security) extended operation. If you use
177 .B \-ZZ\c
178 , the command will require the operation to be successful.
179 .SH EXAMPLES
180 .nf
181     ldapcompare "uid=babs,dc=example,dc=com"  sn:Jensen
182     ldapcompare "uid=babs,dc=example,dc=com"  sn::SmVuc2Vu
183 .fi
184 are all equivalent.
185 .SH LIMITATIONS
186 Requiring the value be passed on the command line is limiting
187 and introduces some security concerns.  The command should support
188 a mechanism to specify the location (file name or URL) to read
189 the value from.
190 .SH "SEE ALSO"
191 .BR ldap.conf (5),
192 .BR ldif (5),
193 .BR ldap (3),
194 .BR ldap_compare (3)
195 .SH AUTHOR
196 The OpenLDAP Project <http://www.openldap.org/>
197 .SH ACKNOWLEDGEMENTS
198 .B OpenLDAP
199 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
200 .B OpenLDAP
201 is derived from University of Michigan LDAP 3.3 Release.