JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Fusion Middleware Administration Guide for Oracle Unified Directory 11g Release 1 (11.1.1)
search filter icon
search icon

Document Information

Preface

1.  Starting and Stopping the Server

2.  Configuring the Server Instance

3.  Configuring the Proxy Components

4.  Configuring Security Between Clients and Servers

5.  Configuring Security Between the Proxy and the Data Source

6.  Managing Oracle Unified Directory With Oracle Directory Services Manager

7.  Managing Directory Data

Importing and Exporting Data

Populating a Stand-Alone Directory Server With Data

Importing Data Using import-ldif

import-ldif Operation Modes

To Import Data in Offline Mode

To Replace Existing Data During an Offline Import

To Append Imported Data to Existing Data

To Import Fractional Files

To Import Fractional Files by Using Filters

To Include or Exclude Attributes During Import

To Import a Compressed LDIF File

To Record Rejected or Skipped Entries During Import

To Import Data From a MakeLDIF Template

To Run an Import in Online Mode

To Schedule an Import

Exporting Data Using export-ldif

export-ldif Operation Modes

To Export Data to LDIF

To Export Partial Data

To Export Part of a Back End by Using Filters

To Include or Exclude Attributes During Export

To Export to LDIF and Then Compress the File

To Run an Export in Online Mode

To Schedule an Export

Creating MakeLDIF Template Files

The Template File Format

Custom Tag Includes

Global Replacement Variables

Branch Definitions

Template Definitions

make-ldif Template File Tags

Standard Replacement Tags

Attribute Value Reference Tags

Tag Evaluation Order

Defining Custom Tags

Importing Large Data Sets

Setting the Import Options

Tuning the JVM and Java Arguments

Backing Up and Restoring Data

Overview of the Backup and Restore Process

Backing Up Data

To Back Up All Back Ends

To Back Up All Back Ends with Encryption and Signed Hashes

To Perform an Incremental Backup on All Back Ends

To Back Up a Specific Back End

To Perform an Incremental Backup on a Specific Back End

To Schedule a Backup as a Task

Backing Up the Server Configuration

Backing Up for Disaster Recovery

To Back Up the Directory Server For Disaster Recovery

Backing up and Restoring Data Using File System Snapshots

To Take a ZFS Snapshot On a Dedicated Backup Server

To Restore a Directory Server From a ZFS Snapshot

Restoring Data

To Restore a Back End

To Restore a Back End From Incremental Backups

To Schedule a Restore as a Task

To Restore the Configuration File

To Restore a Directory Server During Disaster Recovery

Restoring Replicated Directory Servers

Deleting Backup Data

To Delete Backup Files

Searching Directory Data

Overview of the ldapsearch Command

ldapsearch Location and Format

Common ldapsearch Options

Understanding Search Criteria

Specifying Filter Types and Operators

Using Compound Search Filters

Using UTF-8 Encoding in Search Filters

Using Special Characters in Search Filters

ldapsearch Examples

To Return All Entries

To Search For a Specific User

To Search for Specific User Attributes

To Perform a Search With Base Scope

To Perform a Search With One-Level Scope

To Perform a Search With Subtree Scope

To Return Attribute Names Only

To Return User Attributes Only

To Return Base DNs Only

To Search For Specific Object Classes

To Return a Count of All Entries in the Directory

To Perform a Search With a Compound Filter

To Perform a Search Using a Filter File

To Limit the Number of Entries Returned in a Search

Searching Data With Oracle Directory Services Manager

Perform a Complex LDAP Search

Using Advanced Search Features

Searching for Special Entries and Attributes

To Search for Operational Attributes

To Search the Root DSE Entry

To Search for ACI Attributes

To Search the Schema Entry

To Search the Configuration Entry

To Search the Monitoring Entry

Searching Over SSL

To Search Over SSL With Blind Trust

To Search Over SSL Using a Trust Store

To Search Over SSL With No Trust Store

To Search Over SSL Using a Keystore

To Search Using StartTLS

To Search Using SASL With DIGEST-MD5 Client Authentication

To Search Using SASL With the GSSAPI Mechanism

To Search Using SASL With the PLAIN Mechanism

Searching Using Controls

To View the Available Controls

To Search Using the Account Usability Request Control

To Search Using the Authorization Identity Request Control

To Search Using the Get Effective Rights Control

To Search Using the LDAP Assertion Control

To Search Using the LDAP Subentry Control

To Search Using the Manage DSA IT Control

To Search Using the Matched Values Filter Control

To Search Using the Password Policy Control

To Search Using the Persistent Search Control

To Search Using the Proxied Authorization Control

To Search Using the Server-Side Sort Control

To Search Using the Simple Paged Results Control

Searching Using the Virtual List View Control

To Search Using the Virtual List View Control

To Search Using Virtual List View With a Specific Target

To Search Using Virtual List View With a Known Total

Searching in Verbose Mode and With a Properties File

To Search in Verbose Mode

To Search Using a Properties File

Searching Internationalized Entries

Examples

Supported Collation Rules

Adding, Modifying, and Deleting Directory Data

Adding Directory Entries

To Create a Root Entry

To Add an Entry Using the --defaultAdd Option With ldapmodify

To Add Entries Using an LDIF Update Statement With ldapmodify

Adding Attributes

To Add an Attribute to an Entry

To Add an ACI Attribute

To Add an International Attribute

Modifying Directory Entries

To Modify an Attribute Value

To Modify an Attribute With Before and After Snapshots

To Delete an Attribute

To Change an RDN

To Move an Entry

Deleting Directory Entries

To Delete an Entry With ldapmodify

To Delete an Entry With ldapdelete

To Delete Multiple Entries by Using a DN File

Indexing Directory Data

Configuring Indexes on the Local DB Back End

To Create a New Local DB Index

Configuring VLV Indexes

To Create a New VLV Index

Reducing Stored Data Size

To Enable or Disable Compact Encoding

To Enable or Disable Entry Compression

Ensuring Attribute Value Uniqueness

Overview of the Unique Attribute Plug-In

Configuring the Unique Attribute Plug-In Using dsconfig

To Ensure Uniqueness of the Value of the uid Attribute

To Ensure Uniqueness of the Value of Any Other Attribute

Replication and the Unique Attribute Plug-In

Configuring Virtual Attributes

To List the Existing Virtual Attributes

To Create a New Virtual Attribute

To Enable or Disable a Virtual Attribute

To Display the Configuration of a Virtual Attribute

To Change the Configuration of a Virtual Attribute

Using Collective Attributes

Extensions to the Collective Attributes Standard

Naming Collective Attributes

Collective Attributes and Conflict Resolution

Excluding Collective Attributes From Specific Entries

Configuring Collective Attributes

To Create a New Collective Attribute

To Delete a Collective Attribute

To List the Collective Attributes That Apply to an Entry

Inherited Collective Attributes

Specifying Inherited Collective Attributes

Configuring Referrals

Configuring LDAP URLs

Example LDAP URLs

To Create a Referral

To Modify a Referral

To Delete a Referral

Managing Data With Oracle Directory Services Manager

Display Entries

View the Attributes of an Entry

Search for Entries

Add an Entry

Add an Entry Based on an Existing Entry

Delete an Entry

Delete an Entry and its Subtree

Modify an Entry's RDN

Import Data From an LDIF File

Export Data to an LDIF File

8.  Replicating Directory Data

9.  Controlling Access To Data

10.  Managing Users and Groups With dsconfig

11.  Managing Password Policies

12.  Managing Directory Schema

13.  Monitoring Oracle Unified Directory

14.  Tuning Performance

15.  Advanced Administration

Using Advanced Search Features

The directory server supports LDAPv3-compliant search functionality by using the ldapsearch command. You can use special attributes, security options, and LDAP controls with the search process, based on your system configuration. For additional information, see Searching Directory Data, Using a Properties File With Server Commands in Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory, and ldapsearch in Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory.

Searching for Special Entries and Attributes

This section describes how to search for operational attributes and how to search the Root DSE entry.

To Search for Operational Attributes

Operational attributes are used for storing information needed for processing by the directory server itself or for holding any other data maintained by the directory server that was not explicitly provided by clients. Operational attributes are not included in entries returned from search operations unless they are explicitly included in the list of search attributes. You can request the directory server to return operational attributes by adding + (the plus sign) in your ldapsearch command.

To Search the Root DSE Entry

The Root DSE is a special entry that provides information about the server's name, version, naming contexts, and supported features. Because many of the attributes are operational, you must specify + (the plus sign) to display the attributes of the Root DSE entry.

To Search for ACI Attributes

The directory server stores access control instructions (ACIs) as one or more values of the aci attribute on an entry to allow or deny access to the directory database. The aci attribute is a multi-valued operational attribute that can be read and modified by directory users and that should itself be protected by ACIs. Administrative users are usually given full access to the aci attribute and can view its values by running an ldapsearch command.

To Search the Schema Entry

The directory server holds schema information in the schema entry (cn=schema) for the object classes and attributes defined on your instance.

To Search the Configuration Entry

The directory server stores its configuration under the cn=config entry. Direct access to this entry over LDAP is not advised. The configuration is accessible and modifiable by using the dsconfig command. dsconfig connects to the directory server over SSL via the administration connector. For more information, see Managing Administration Traffic to the Server.

To Search the Monitoring Entry

The directory server monitor entry cn=monitor provides statistical information about the server performance, state, and version. You can access this information by using the ldapsearch command.

Although you can access cn=monitor using any configured LDAP connection handler, it is recommended that you use the administration connector for all access to administrative suffixes. Using the administration connector ensures that monitoring data is not polluted and that server administration takes precedence over user traffic. To use the administration connector, specify the administration port, and include the --useSSL option. For more information, see Managing Administration Traffic to the Server.

Searching Over SSL

If you have configured the directory server to accept SSL connections by using a self-signed certificate or certificate, you can search using client authentication. The following procedures show how to search the directory over SSL using various authentication mechanisms.

To Search Over SSL With Blind Trust

You can configure the client to automatically trust any certificate that the server presents to it. However, this method is not secure and is vulnerable to man-in-the-middle attacks. Generally, you should use this type of authentication for testing purposes only.

To Search Over SSL Using a Trust Store

You can configure the client to use a certificate trust store, which contains information about the certificates it can trust. The client can check any server certificate to those listed in its trust store. If the client finds a match, a secure communication can take place with the server. If no match is found, the server cannot be trusted. You must ensure that the presented certificate is valid and add it to the trust store, which then allows secure communication.

To Search Over SSL With No Trust Store

If no trust store is specified, you are prompted as to whether the certificate that was presented to the client should be trusted.

To Search Over SSL Using a Keystore

If the client is required to present its own certificate to the directory server, that client must know which certificate keystore to use. The client can determine the certificate keystore by specifying the --keyStorePath option with either the --keyStorePassword or --keyStorePasswordFile. This scenario typically occurs when the client performs a SASL EXTERNAL authentication or if the server always requires the client to present its own certificates.

To Search Using StartTLS

The process for using StartTLS with the ldapsearch utility is very similar to the process for using SSL. However, you must do the following:

To Search Using SASL With DIGEST-MD5 Client Authentication

The directory server supports a number of Simple Authentication and Security Layer (SASL) mechanisms. DIGEST-MD5 is one form of SASL authentication to the server that does not expose the clear-text password.

To Search Using SASL With the GSSAPI Mechanism

The GSSAPI mechanism performs authentication in a Kerberos environment and requires that the client system be configured to participate in such an environment.

To Search Using SASL With the PLAIN Mechanism

The PLAIN mechanism performs authentication in a manner similar to LDAP simple authentication except that the user is identified in the form of an authorization ID rather than a full DN.

Searching Using Controls

LDAP controls extend the functionality of LDAP commands, such as ldapsearch, to carry out additional operations on top of the search. Each control is defined as an object identifier (OID) that uniquely identifies the control, a criticality flag, and any associated values. If the client sets the criticality flag when sending the control to the directory server, the directory server must either perform the operation with the control or not process it. If the flag is not set by the client, the directory server is free to ignore the control if it cannot process it.

You can use multiple controls in a single operation, such as the virtual list view with server-side sorting. The virtual list view control requires additional explanation and is therefore described in its own section, following this one.

To View the Available Controls

You can view the current list of controls for your directory server by searching the Root DSE entry for the supportedControl attribute.

To Search Using the Account Usability Request Control

The Account Usability Request Control determines if a user account can be used to authenticate to a server. If the user account is available, the control adds a message before any entry about whether the account is usable.

You can specify the Account Usability Request Control with ldapsearch in the following ways:

To Search Using the Authorization Identity Request Control

The Authorization Identity Request Control allows the client to obtain the authorization identity for the client connection during the LDAP bind request. The authorization ID returned by the server is displayed to the client as soon as authentication has completed. The line containing the authorization ID is prefixed with a # character, making it a comment if the output is to be interpreted as an LDIF.

You can specify the Authorization Identity Request Control with ldapsearch in a number of ways:

To Search Using the Get Effective Rights Control

The Get Effective Rights Control enables you to evaluate existing or new ACIs and to see the effective rights that they grant for a user on a specified entry.

The response to this control is to return the effective rights information about the entries and attributes in the search results. This extra information includes read and write permissions for each entry and for each attribute in each entry. The permissions can be requested for the bind DN used for the search or for an arbitrary DN, allowing administrators to test the permissions of directory users.

The ldapsearch command provides two ways to use the Get Effective Rights Control:


Note - You cannot use the -g option with the -J option.


To view effective rights, you should specify the virtual attributes aclRights and aclRightsInfo, which are generated by the server in response to the effective rights request. Thus, you should not use these attributes in search commands of any kind.

  1. Use the ldapsearch command to display the effective rights of all users.
    $ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
      -b dc=example,dc=com -J effectiverights "(objectclass=*)" aclRights  
    
    dn: dc=example,dc=com 
    aclRights;entryLevel: add:0,delete:0,read:1,write:0,proxy:0
    
    dn: ou=Groups, dc=example,dc=com
    aclRights;entryLevel: add:0,delete:0,read:1,write:0,proxy:0
    
    dn: ou=People, dc=example,dc=com
    aclRights;entryLevel: add:0,delete:0,read:1,write:0,proxy:0
    
    dn: cn=Accounting Managers,ou=groups,dc=example,dc=com
    aclRights;entryLevel: add:0,delete:0,read:1,write:0,proxy:0
    
    dn: cn=HR Managers,ou=groups,dc=example,dc=com
    aclRights;entryLevel: add:0,delete:0,read:1,write:0,proxy:0
    
    ...
  2. Use the ldapsearch command to display the effective rights of a specific user.

    This example uses the --getEffectiveRightsAuthzid option. You can also use the --control or -J option, such as -J geteffectiverights.

    $ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
      -b dc=example,dc=com \
      --getEffectiveRightsAuthzid "dn:uid=scarter,ou=People,dc=example,dc=com" \
      "(uid=scarter)" aclRights
    dn: uid=scarter,ou=People,dc=example,dc=com
    aclRights;entryLevel: add:0,delete:0,read:1,write:1,proxy:0
  3. Use the ldapsearch command to display effective rights information for a specific user.

    The aclRightsInfo attribute provides more detailed logging information that explains how effective rights are granted or denied.

    ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
      -b dc=example,dc=com \ 
      --getEffectiveRightsAuthzid "dn:uid=scarter,ou=People,dc=example,dc=com"\
      "(uid=scarter)" aclRightsInfo
    
    dn: uid=scarter,ou=People,dc=example,dc=com
    aclRightsInfo;logs;entryLevel;add: acl_summary(main): access not allowed(add) on 
    entry/attr(uid=scarter,ou=People,dc=example,dc=com, NULL) to 
     (uid=scarter,ou=People,dc=example,dc=com) 
    (not proxied) ( reason: no acis matched the subject )
    aclRightsInfo;logs;entryLevel;proxy: acl_summary(main): access not allowed(proxy ) on 
    entry/attr(uid=scarter,ou=People,dc=example,dc=com, NULL) to 
     (uid=scarter, ou=People,dc=example,dc=com) 
    (not proxied) ( reason: no acis matched the subject )
    aclRightsInfo;logs;entryLevel;write: acl_summary(main): access allowed(write) on  
    entry/attr(uid=scarter,ou=People,dc=example,dc=com, NULL) to 
     (uid=scarter,ou=People,dc=example,dc=com) 
    (not proxied) ( reason: evaluated allow , deciding_aci : Allow self entry modification)
    aclRightsInfo;logs;entryLevel;read: acl_summary(main): access allowed(read) on 
    entry/attr(uid=scarter,ou=People,dc=example,dc=com, NULL) to 
     (uid=scarter,ou=People,dc=example,dc=com) 
    (not proxied) ( reason: evaluated allow , deciding_aci: Anonymous extended 
     operation access)
    aclRightsInfo;logs;entryLevel;delete: acl_summary(main): access not allowed(delete) on 
    entry/attr(uid=scarter,ou=People,dc=example,dc=com, NULL) to 
     (uid=scarter,ou=People,dc=example,dc=com) 
    (not proxied) ( reason: no acis matched the subject )

To Search Using the LDAP Assertion Control

The LDAP Assertion Control allows you to specify a condition that must evaluate to true for the searching operation to process. The value of the control should be in the form of an LDAP search filter. The server tests the base object before searching for entries that match the search scope and filter. If the assertion fails, no entries are returned.

This example determines first if the assertion is met, and returns the entry if it matches the search filter.

To Search Using the LDAP Subentry Control

The LDAP Subentry Control allows the client to request that the server return only entries with the ldapSubEntry object class during a search operation. LDAP subentries are operational objects, similar to operational attributes, that are returned only if they are explicitly requested. Typically, you can use the control when searching the schema.

You request the server to return subentries with ldapsearch in the following ways:

To Search Using the Manage DSA IT Control

The Manage DSA IT Control allows the client to request that the server treat smart referrals as regular entries during the search. A smart referral is an entry that references another server or location in the directory information tree DIT and contains the referral object class with one or more attributes containing the LDAP URLs that specify the referral.

You can specify the Manage DSA IT Control with ldapsearch in a number of ways:

To Search Using the Matched Values Filter Control

The Matched Values Filter Control allows clients to request a subset of attribute values from an entry that evaluate to TRUE. This control allows the user to selectively read a subset of attribute values without retrieving all values, and then scan for the desired set locally.

To Search Using the Password Policy Control

The Password Policy Control allows a client to request information about the current password policy information for a user entry.

You can specify the Password Policy Control with ldapsearch in a number of ways:


Note - The -J or --control option is used to specify which controls to use in a search request. The --usePasswordPolicyControl option is used for bind requests.


To Search Using the Persistent Search Control

The Persistent Search Control allows a client to receive notification when entries in the directory are changed by an add, delete, or modify operation. When a change occurs, the server sends the updated entry to the client if the entry matches the search criteria that was used by the Entry Change Notification Control.

The ldapsearch command provides an option to run a persistent search (-C) that keeps the connection open and displays the entries that match the scope and filter whenever any changes (add, delete, modify, or all) occur. You can quit the search by pressing Control-C.

The value for this argument must be in the form: ps[[:''changetype''[[:''changesonly''[[:''entrychangecontrols'']]]

The elements of this value include the following:

  1. Run the ldapsearch command as follows:
    $ ldapsearch -h localhost -p 1389 -D "cn=admin,cn=Administrators,cn=config" \
      -w password -b dc=example,dc=com --persistentSearch ps:add:true:true \
      "(objectclass=*)"

    Note - When you use this command, the server waits for any changes made using add, delete, modify or all to return values.


  2. Open another terminal window , and use ldapmodify to add a new entry.
    $ ldapmodify -h localhost -p 1389 -b dc=example,dc=com \
      --defaultAdd --filename new_add.ldif
    Processing ADD request for uid=Marcia Garza,ou=People,dc=example,dc=com
    ADD operation successful for DN uid=Marcia Garza,ou=People,dc=example,dc=com
  3. The original terminal window shows the change.

    To end the session, press Control-Z (Unix/Linux) or Control-C (Windows).

    # Persistent search change type:  add
    dn: uid=Marcia Garza,ou=People,dc=example,dc=com
    objectClass: person
    objectClass: inetOrgPerson
    objectClass: organizationalPerson
    objectClass: top
    givenName: Marcia
    uid: mgarza
    uid: Marcia Garza
    cn: Marcia Garza
    sn: Garza
    userpassword: {SSHA}SNfL1RUm5uvTnLK+G0K3oz+Peb1i5/+YsylfBg==
    roomnumber: 5484
    l: Santa Clara
    ou: Accounting
    ou: People
    mail: mgarza@example.com 
  4. To terminate the session, press Control-D (Unix/Linux) or Control-C (Windows), and then type Y to quit.
    Terminate batch job (Y/N)?

To Search Using the Proxied Authorization Control

The Proxied Authorization Control allows a client to impersonate another entry for a specific operation. This control can be useful in trusted applications that need to perform on behalf of many different users, so that the application does not need to re-authenticate for each operation.

To Search Using the Server-Side Sort Control

The Server-Side Sort Control allows the client to request that the server sort the search results before sending them to the client. This is convenient when the server has indexes that can satisfy the sort order requested by the client faster than the client can.

You can sort the number of entries returned by using the --sortOrder option. If you do not specify + (a plus sign) for ascending or - (a minus sign) for descending, then the default option is to sort in ascending order.

  1. Use the ldapsearch command to search all entries and to display the results in ascending order.

    Use the --sortOrder option sorted on the attributes sn and givenName.

    $ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
      --s sub -b dc=example,dc=com --sortorder sn,givenName "(objectclass)"
    dn: uid=dakers,ou=People,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    ...<search results>...
  2. Use the ldapsearch command to search all entries and display the results in descending order.

    Use the --sortorder option sorted on the attribute sn.

    $ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w password \
      -s sub -b dc=example,dc=com --sortOrder -sn "(objectclass)"
    dn: uid=pworrell,ou=People,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    ...<search results>...

To Search Using the Simple Paged Results Control

The Simple Paged Results Control allows a search operation to return only a subset of the results at a time. It can be used to iterate through the search results a page at a time. It is similar to the Virtual List View Control with the exception that it does not require the results to be sorted and can only be used to iterate sequentially through the search results.

Searching Using the Virtual List View Control

The Virtual List View Control allows a client to request that the server send search results in small, manageable chunks within a specific range of entries. It also allows a client to move forward and backward through the results of a search operation if configured with a GUI browser or application, or jump directly to a particular entry.


Note - The Virtual List View Control requires that the returned entries be sorted.


Together with the --virtualListView option or its short form -G, specify the following arguments:

For example, the arguments (0:4:1:0) indicate that you want to show 0 entries before and 4 entries after the target entry at index 1. If the client does not know the size of the set, the count is 0.

To Search Using the Virtual List View Control

The sort order option (-S) must be used with the Virtual List View control. This example uses the Virtual List View Control options to specify the following:

Thus, the server returns the first entry plus two entries after the target sorted in ascending order by the givenName attribute.

To Search Using Virtual List View With a Specific Target

The sort order (-S) option must also be used with Virtual List View. The example command uses the Virtual List View Control options to specify the following:

Thus, the server returns the first sn attribute that matches jensen plus four sn attributes after the target sorted in ascending order by the sn attribute.

To Search Using Virtual List View With a Known Total

The sort order (-S) option must also be used with Virtual List View. The example command uses the Virtual List View Control options to specify the following:

Thus, the server returns the first sn attribute that is one-third within the list, plus two sn attributes sorted in ascending order by the sn attribute.

Searching in Verbose Mode and With a Properties File

This section describes how to search in verbose mode and how to search by using a properties file.

To Search in Verbose Mode

Verbose mode displays the processing information that is transmitted between client and server. This mode is convenient for debugging purposes.

To Search Using a Properties File

The directory server supports the use of a properties file that holds default argument values used with the ldapsearch command. The properties file is convenient when working in different configuration environments, especially in scripted or embedded applications. For more information, see Using a Properties File With Server Commands in Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory.

  1. Create a properties file in any text editor, with the following content:
    hostname=localhost 
    port=1389 
    bindDN=cn=Directory Manager 
    bindPassword=password 
    baseDN=dc=example,dc=com 
    searchScope=sub 
    sortOrder=givenName 
    virtualListView=0:2:1:0 
  2. Save the file as tools.properties.
  3. Use the ldapsearch with the --propertiesFilePath option.
    $ ldapsearch --propertiesFilePath tools.properties "(objectclass=*)"

Searching Internationalized Entries

Oracle Unified Directory supports collation rules that match entries and can be used with the server-side sorting control to sort search results. The collation rule is specified in the search filter as a matching rule, delimited by colons, as shown here:

locale.matchingRule

where:

Table 7-1 Matching Rule Suffixes

Matching Rule
Numeric Suffix
Character Suffix
Less than
.1
.lt
Less than or equal to
.2
.lte
Equality
.3
.eq (default)
Greater than or equal to
.4
.gte
Greater than
.5
.gt
Substring
.6
.sub

Equality is the default matching rule. That is, when no matching rule suffix is specified, the collation rule uses equality matching rule. The two following examples are equivalent and specify the English collation rule and the equality matching rule, but the second example specifies the equality matching rule explicitly with the .eq suffix:

"cn:en:=sanchez"
"cn:en.eq:=sanchez"

The next example shows the same search filter, but specified using the locale's character suffix and the matching rule's numeric code:

"cn:en.3:=sanchez"

The following example shows the same search filter specified using the locale OID and the matching rule numeric suffix:

"cn:1.3.6.1.4.1.42.2.27.9.4.34.1.3:=sanchez"

The following examples specify the same search filter but with a Spanish collation rule.

"cn:es.eq:=sanchez"
"cn:1.3.6.1.4.1.42.2.27.9.4.49.1.3:=sanchez"
"cn:es.3:=sanchez"

The following examples specify a similar search filter that uses a greater-than matching rule with the Spanish collation rule.

"cn:es.gt:=sanchez"
"cn:1.3.6.1.4.1.42.2.27.9.4.49.1.5:=sanchez"
"cn:es.5:=sanchez"
Examples

Example 7-1 Equality Search

The following search uses a filter with the en (en-US) locale OID to perform an equality search to return any entry with a cn value of sanchez:

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "cn:1.3.6.1.4.1.42.2.27.9.4.34.1:=sanchez"

The following filters return the same results:

Example 7-2 Less-Than Search

The following search uses a filter with the es (es-ES) locale and performs a less-than search and returns the entry with a departmentnumbervalue of abc119:

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "departmentnumber:1.3.6.1.4.1.42.2.27.9.4.49.1.1:=abc120"

The following filters return the same results:

Example 7-3 Less-Than-or-Equal-To Search

The following search uses a filter with the es (es-ES) locale and performs a less-than-or-equal-to search that returns the entry with a departmentnumbervalue of abc119:

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "departmentnumber:1.3.6.1.4.1.42.2.27.9.4.49.1.2:=abc119"

The following filters return the same results:

Example 7-4 Greater-Than-or-Equal-To Search

The following search uses a filter with the fr (fr-FR) locale and performs a greater-than-or-equal-To search that returns an entry with a departmentnumber value of abc119

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "departmentnumber:fr.4:=abc119"

The following filters return the same results:

Example 7-5 Greater-Than Search

The following search uses a filter with the fr (fr-FR) locale and performs a greater-than search:

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "departmentnumber:fr.5:=abc119"

The above search should not return an entry with a departmentnumber value of abc119.

The following filters return the same results:

Example 7-6 Substring Search

The following search uses a filter with the en (en-US) locale and performs a substring search that returns an entry with an sn value of “Quebec”:

$ ldapsearch -D "cn=directory manager" -w password -b "o=test" \
  "sn:en.6:=*u*bec"

The following filters return the same results:

Supported Collation Rules

The following table lists the internationalization locales supported by Oracle Unified Directory, alphabetized by character suffix.

Table 7-2 Supported Collation Rules

Locale
Character Suffix
OID
Arabic
ar
1.3.6.1.4.1.42.2.27.9.4.3.1
Arabic United Arab Emirates
ar-AE
1.3.6.1.4.1.42.2.27.9.4.4.1
Arabic Bahrain
ar-BH
1.3.6.1.4.1.42.2.27.9.4.5.1
Arabic Algeria
ar-DZ
1.3.6.1.4.1.42.2.27.9.4.6.1
Arabic Egypt
ar-EG
1.3.6.1.4.1.42.2.27.9.4.7.1
Arabic India
ar-IQ
1.3.6.1.4.1.42.2.27.9.4.9.1
Arabic Jordanar
ar-JO
1.3.6.1.4.1.42.2.27.9.4.10.1
Arabic Kuwait
ar-KW
1.3.6.1.4.1.42.2.27.9.4.11.1
Arabic Lebanon
ar-LB
1.3.6.1.4.1.42.2.27.9.4.12.1
Arabic Lybia
ar-LY
1.3.6.1.4.1.42.2.27.9.4.13.1
Arabic Morocco
ar-MA
1.3.6.1.4.1.42.2.27.9.4.14.1
Arabic Oman
ar-OM
1.3.6.1.4.1.42.2.27.9.4.15.1
Arabic Qatar
ar-QA
1.3.6.1.4.1.42.2.27.9.4.16.1
Arabic Saudi Arabia
ar-SA
1.3.6.1.4.1.42.2.27.9.4.17.1
Arabic Sudan
ar-SD
1.3.6.1.4.1.42.2.27.9.4.18.1
Arabic Syria
ar-SY
1.3.6.1.4.1.42.2.27.9.4.19.1
Arabic Tunisia
ar-TN
1.3.6.1.4.1.42.2.27.9.4.20.1
Arabic Yemen
ar-YE
1.3.6.1.4.1.42.2.27.9.4.21.1
Byelorussian
be
1.3.6.1.4.1.42.2.27.9.4.22.1
Bulgaria
bg
1.3.6.1.4.1.42.2.27.9.4.23.1
Catalan
ca
1.3.6.1.4.1.42.2.27.9.4.25.1
Czech
cs
1.3.6.1.4.1.42.2.27.9.4.26.1
Danish
da
1.3.6.1.4.1.42.2.27.9.4.27.1
German
de
1.3.6.1.4.1.142.2.27.9.4.28.1
German Germany
de-DE
1.3.6.1.4.1.142.2.27.9.4.28.1
German Austria
de-AT
1.3.6.1.4.1.42.2.27.9.4.29.1
German Swiss
de-CH
1.3.6.1.4.1.42.2.27.9.4.31.1
German Luxembourg
de-LU
1.3.6.1.4.1.42.2.27.9.4.32.1
Greek
el
1.3.6.1.4.1.42.2.27.9.4.33.1
English
en
1.3.6.1.4.1.42.2.27.9.4.34.1
English US
en-US
1.3.6.1.4.1.42.2.27.9.4.34.1
English Australia
en-AU
1.3.6.1.4.1.42.2.27.9.4.35.1
English Canada
en-CA
1.3.6.1.4.1.42.2.27.9.4.36.1
English Great Britain
en-GB
1.3.6.1.4.1.42.2.27.9.4.37.1
English Ireland
en-IE
1.3.6.1.4.1.42.2.27.9.4.39.1
English India
en-IN
1.3.6.1.4.1.42.2.27.9.4.40.1
English New Zealand
en-NZ
1.3.6.1.4.1.42.2.27.9.4.42.1
English South Africa
en-ZA
1.3.6.1.4.1.42.2.27.9.4.46.1
Spanish
es
1.3.6.1.4.1.42.2.27.9.4.49.1
Spanish Spain
es-ES
1.3.6.1.4.1.42.2.27.9.4.49.1
Spanish Argentina
es-AR
1.3.6.1.4.1.42.2.27.9.4.50.1
Spanish Bolivia
es-BO
1.3.6.1.4.1.42.2.27.9.4.51.1
Spanish Chile
es-CL
1.3.6.1.4.1.42.2.27.9.4.52.1
Spanish Colombia
es-CO
1.3.6.1.4.1.42.2.27.9.4.53.1
Spanish Costa Rica
es-CR
1.3.6.1.4.1.42.2.27.9.4.54.1
Spanish Dominican Republic
es-DO
1.3.6.1.4.1.42.2.27.9.4.55.1
Spanish Ecuador
es-EC
1.3.6.1.4.1.42.2.27.9.4.56.1
Spanish Guatemala
es-GT
1.3.6.1.4.1.42.2.27.9.4.57.1
Spanish Honduras
es-HN
1.3.6.1.4.1.42.2.27.9.4.58.1
Spanish Mexico
es-MX
1.3.6.1.4.1.42.2.27.9.4.59.1
Spanish Nicaragua
es-NI
1.3.6.1.4.1.42.2.27.9.4.60.1
Spanish Panama
es-PA
1.3.6.1.4.1.42.2.27.9.4.61.1
Spanish Peru
es-PE
1.3.6.1.4.1.42.2.27.9.4.62.1
Spanish Puerto Rico
es-PR
1.3.6.1.4.1.42.2.27.9.4.63.1
Spanish Paraguay
es-PY
1.3.6.1.4.1.42.2.27.9.4.64.1
Spanish Salvador
es-SV
1.3.6.1.4.1.42.2.27.9.4.65.1
Spanish Uraguay
es-UY
1.3.6.1.4.1.42.2.27.9.4.67.1
Spanish Venezuela
es-VE
1.3.6.1.4.1.42.2.27.9.4.68.1
Estonian
et
1.3.6.1.4.1.42.2.27.9.4.69.1
Finnish
fi
1.3.6.1.4.1.42.2.27.9.4.74.1
French
fr
1.3.6.1.4.1.42.2.27.9.4.76.1
French
fr-FR
1.3.6.1.4.1.42.2.27.9.4.76.1
French
fr-BE
1.3.6.1.4.1.42.2.27.9.4.77.1
French
fr-CA
1.3.6.1.4.1.42.2.27.9.4.78.1
French
fr-CH
1.3.6.1.4.1.42.2.27.9.4.79.1
French
fr-LU
1.3.6.1.4.1.42.2.27.9.4.80.1
Hebrew
he
1.3.6.1.4.1.42.2.27.9.4.85.1
Croatian
hr
1.3.6.1.4.1.42.2.27.9.4.87.1
Hungarian
hu
1.3.6.1.4.1.42.2.27.9.4.88.1
Icelandic
is
1.3.6.1.4.1.42.2.27.9.4.91.1
Italian
it
1.3.6.1.4.1.42.2.27.9.4.92.1
Italian-Swiss
it-CH
1.3.6.1.4.1.42.2.27.9.4.93.1
Japanese
ja
1.3.6.1.4.1.42.2.27.9.4.94.1
Korean
ko
1.3.6.1.4.1.42.2.27.9.4.97.1
Lithuanian
lt
1.3.6.1.4.1.42.2.27.9.4.100.1
Latvian
lv
1.3.6.1.4.1.42.2.27.9.4.101.1
Macedonian
mk
1.3.6.1.4.1.42.2.27.9.4.102.1
Dutch
nl
1.3.6.1.4.1.42.2.27.9.4.105.1
Dutch Netherlands
nl-NL
1.3.6.1.4.1.42.2.27.9.4.105.1
Dutch Belgium
nl-BE
1.3.6.1.4.1.42.2.27.9.4.106.1
Norwegian
no
1.3.6.1.4.1.42.2.27.9.4.107.1
Norwegian Norway
no-NO
1.3.6.1.4.1.42.2.27.9.4.107.1
Norwegian Nynorsk
no-NO-NY
1.3.6.1.4.1.42.2.27.9.4.108.1
Polish
pl
1.3.6.1.4.1.42.2.27.9.4.114.1
Portuguese
pt
1.3.6.1.4.1.42.2.27.9.4.115.1
Portuguese Portugal
pt-PT
1.3.6.1.4.1.42.2.27.9.4.115.1
Portugues Brazil
pt-BR
1.3.6.1.4.1.42.2.27.9.4.116.1
Romanian
ro
1.3.6.1.4.1.42.2.27.9.4.117.1
Russian
ru
1.3.6.1.4.1.42.2.27.9.4.118.1
Russian Russia
ru-RU
1.3.6.1.4.1.42.2.27.9.4.118.1
Slovak
sk
1.3.6.1.4.1.42.2.27.9.4.121.1
Slovenia
sl
1.3.6.1.4.1.42.2.27.9.4.122.1
Albanian
sq
1.3.6.1.4.1.42.2.27.9.4.127.1
Serbian
sr
1.3.6.1.4.1.42.2.27.9.4.128.1
Swedish
sv
1.3.6.1.4.1.42.2.27.9.4.129.1
Swedish Sweden
sv-SE
1.3.6.1.4.1.42.2.27.9.4.129.1
Thai
th
1.3.6.1.4.1.42.2.27.9.4.136.1
Turkish
tr
1.3.6.1.4.1.42.2.27.9.4.140.1
Ukrainian
uk
1.3.6.1.4.1.42.2.27.9.4.141.1
Vietnamese
vi
1.3.6.1.4.1.42.2.27.9.4.142.1
Chinese
zh
1.3.6.1.4.1.42.2.27.9.4.143.1
Chinese China
zh-CN
1.3.6.1.4.1.42.2.27.9.4.144.1
Chinese Hong Kong
zh-HK
1.3.6.1.4.1.42.2.27.9.4.145.1
Chinese Taiwan
zh-TW
1.3.6.1.4.1.42.2.27.9.4.148.1