]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapcompare.1
Sync with HEAD
[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 \-M[M] ]
17 [\c
18 .BI \-d \ debuglevel\fR]
19 [\c
20 .BI \-D \ binddn\fR]
21 [\c
22 .BR \-W ]
23 [\c
24 .BI \-w \ passwd\fR]
25 [\c
26 .BI \-y \ passwdfile\fR]
27 [\c
28 .BI \-H \ ldapuri\fR]
29 [\c
30 .BI \-h \ ldaphost\fR]
31 [\c
32 .BI \-p \ ldapport\fR]
33 [\c
34 .BI \-P \ 2\fR\||\|\fI3\fR]
35 [\c
36 .BR \-O \ security-properties ]
37 [\c
38 .BR \-I ]
39 [\c
40 .BR \-Q ]
41 [\c
42 .BI \-U \ authcid\fR]
43 [\c
44 .BI \-R \ realm\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.  The result code of the compare is provided as
69 the exit code and, unless ran with -z, the program prints
70 TRUE, FALSE, or UNDEFINED on standard output.
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 \-M[M]
86 Enable manage DSA IT control.
87 .B \-MM
88 makes control critical.
89 .TP
90 .BI \-d \ debuglevel
91 Set the LDAP debugging level to \fIdebuglevel\fP.
92 .B ldapcompare
93 must be compiled with LDAP_DEBUG defined for this option to have any effect.
94 .TP
95 .B \-x 
96 Use simple authentication instead of SASL.
97 .TP
98 .BI \-D \ binddn
99 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
100 .TP
101 .B \-W
102 Prompt for simple authentication.
103 This is used instead of specifying the password on the command line.
104 .TP
105 .BI \-w \ passwd
106 Use \fIpasswd\fP as the password for simple authentication.
107 .TP
108 .BI \-y \ passwdfile
109 Use complete contents of \fIpasswdfile\fP as the password for
110 simple authentication.
111 .TP
112 .BI \-H \ ldapuri
113 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
114 fields are allowed; a list of URI, separated by whitespace or commas
115 is expected.
116 .TP
117 .BI \-h \ ldaphost
118 Specify an alternate host on which the ldap server is running.
119 Deprecated in favor of -H.
120 .TP
121 .BI \-p \ ldapport
122 Specify an alternate TCP port where the ldap server is listening.
123 Deprecated in favor of -H.
124 .TP
125 .BI \-P \ 2\fR\||\|\fI3
126 Specify the LDAP protocol version to use.
127 .TP
128 .BI \-O \ security-properties
129 Specify SASL security properties.
130 .TP
131 .B \-I
132 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
133 only as needed.
134 .TP
135 .B \-Q
136 Enable SASL Quiet mode.  Never prompt.
137 .TP
138 .BI \-U \ authcid
139 Specify the authentication ID for SASL bind. The form of the ID
140 depends on the actual SASL mechanism used.
141 .TP
142 .BI \-R \ realm
143 Specify the realm of authentication ID for SASL bind. The form of the realm
144 depends on the actual SASL mechanism used.
145 .TP
146 .BI \-X \ authzid
147 Specify the requested authorization ID for SASL bind.
148 .I authzid
149 must be one of the following formats:
150 .B dn:\c
151 .I <distinguished name>
152 or
153 .B u:\c
154 .I <username>
155 .TP
156 .BI \-Y \ mech
157 Specify the SASL mechanism to be used for authentication. If it's not
158 specified, the program will choose the best mechanism the server knows.
159 .TP
160 .B \-Z[Z]
161 Issue StartTLS (Transport Layer Security) extended operation. If you use
162 .B \-ZZ\c
163 , the command will require the operation to be successful.
164 .SH EXAMPLES
165 .nf
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 LIMITATIONS
171 Requiring the value be passed on the command line is limiting
172 and introduces some security concerns.  The command should support
173 a mechanism to specify the location (file name or URL) to read
174 the value from.
175 .SH "SEE ALSO"
176 .BR ldap.conf (5),
177 .BR ldif (5),
178 .BR ldap (3),
179 .BR ldap_compare (3)
180 .SH AUTHOR
181 The OpenLDAP Project <http://www.openldap.org/>
182 .SH ACKNOWLEDGEMENTS
183 .B OpenLDAP
184 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
185 .B OpenLDAP
186 is derived from University of Michigan LDAP 3.3 Release.