<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="ldapcompare-1" xmlns="http://docbook.org/ns/docbook"
version="5.0" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>ldapcompare</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>ldapcompare</application></refname>
<refpurpose>perform LDAP compare operations</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>ldapcompare</command>
<arg>-m</arg>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-ops"]/*[not(@name="sc-authz")])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-proto"]/*[@name="sc-ssl-tls"
or @name="sc-lver"])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<arg>-r</arg>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-misc"]/*[not(@name="sc-quiet")])'/>
<arg>--version</arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*[@name="sc-help"])'/>
<sbr/><sbr/>
<arg>
<replaceable>attribute</replaceable>:<replaceable>value</replaceable>
</arg>
<arg rep="repeat">DN</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to perform LDAP compare operations in the directory.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-m, --useCompareResultCode</option></term>
<listitem>
<para>
Use the LDAP compare result as an exit code for reporting differences between
the two LDIF files.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-ops"]/*[not(@name="lc-authz")])'/>
</variablelist>
<refsection>
<title>LDAP Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-proto"]/*[@name="lc-ssl"
or @name="lc-tls" or @name="lc-lver"])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
<varlistentry>
<term><option>-r, --useSASLExternal</option></term>
<listitem>
<para>
Use the SASL EXTERNAL authentication mechanism.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-misc"]/*[not(@name="lc-quiet")])'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<varlistentry>
<term><option>--version</option></term>
<listitem>
<para>
Display version information.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*[@name="lc-help"])'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following examples demonstrate comparing Babs Jensen's UID. It uses a
matching UID value.
</para>
<literallayout><prompt
>$ </prompt><command>ldapcompare -p 1389 uid:bjensen \
uid=bjensen,ou=people,dc=example,dc=com</command></literallayout>
<screen>
Comparing type uid with value bjensen in entry
uid=bjensen,ou=people,dc=example,dc=com
Compare operation returned true for entry
uid=bjensen,ou=people,dc=example,dc=com
</screen>
</informalexample>
<informalexample>
<para>
The following example uses a UID value that does not match.
</para>
<literallayout><prompt
>$ </prompt><command>ldapcompare -p 1389 uid:beavis \
uid=bjensen,ou=people,dc=example,dc=com</command></literallayout>
<screen>
Comparing type uid with value beavis in entry
uid=bjensen,ou=people,dc=example,dc=com
Compare operation returned false for entry
uid=bjensen,ou=people,dc=example,dc=com
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<refsection name='exit-ops'>
<title>Exit Codes</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//refsection[@name="exit-ops"]/variablelist/varlistentry[position()=1])'/>
<varlistentry>
<term><errorcode>5</errorcode></term>
<listitem>
<para>
The <option>-m</option> option was used, and no differences are reported.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>6</errorcode></term>
<listitem>
<para>
The <option>-m</option> option was used, and differences are reported.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//refsection[@name="exit-ops"]/variablelist/varlistentry[position()!=1])'/>
</variablelist>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>