2011-2013ForgeRock AS ldapcompare1 OpenDJ ldapcompare perform LDAP compare operations ldapcompare options attribute:value DN Description This utility can be used to perform LDAP compare operations in the directory. Options The following options are supported. Use the LDAP assertion control with the provided filter Continue processing even if there are errors LDIF file containing one DN per line of entries to compare Use a request control with the provided information Use the LDAP compare result as an exit code for the LDAP compare operations. Show what would be done but do not perform any operation LDAP Connection Options Maximum length of time (in milliseconds) that can be taken to establish a connection. Use '0' to specify no time out. Default value: 30000 DN to use to bind to the server Default value: cn=Directory Manager Directory server hostname or IP address Default value: localhost.localdomain Bind password file Certificate key store path Nickname of certificate for SSL client authentication SASL bind options Directory server port number Default value: 389 Certificate trust store path Use StartTLS to secure communication with the server Use the SASL EXTERNAL authentication mechanism Certificate trust store PIN Certificate key store PIN file Certificate trust store PIN file LDAP protocol version number Default value: 3 Password to use to bind to the server Certificate key store PIN Trust all server SSL certificates Use SSL for secure communication with the server Utility Input/Output Options Use the specified character set for command-line input No properties file will be used to get default command line argument values Path to the file containing default property values used for command line arguments Use script-friendly mode Use verbose mode General Options Display version information Display usage information Exit Codes 0 The command completed successfully. 5 The -m option was used, and at least one of the LDAP compare operations did not match. 6 The -m option was used, and all the LDAP compare operations did match. ldap-error An LDAP error occurred while processing the operation. LDAP result codes are described in RFC 4511. Also see the additional information for details. 89 An error occurred while parsing the command-line arguments. Files You can use ~/.opendj/tools.properties to set the defaults for bind DN, host name, and port number as in the following example. hostname=directory.example.com port=1389 bindDN=uid=kvaughan,ou=People,dc=example,dc=com ldapcompare.port=1389 ldapdelete.port=1389 ldapmodify.port=1389 ldappasswordmodify.port=1389 ldapsearch.port=1389 Examples The following examples demonstrate comparing Babs Jensen's UID. The following example uses a matching UID value. $ ldapcompare -p 1389 uid:bjensen uid=bjensen,ou=people,dc=example,dc=com 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 The following example uses a UID value that does not match. $ ldapcompare -p 1389 uid:beavis uid=bjensen,ou=people,dc=example,dc=com 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