Skip Headers
Oracle Internet Directory Administrator's Guide
10g (10.1.4.0.1)

Part Number B15991-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Directory Entries Administration

This chapter explains how to view, add, modify, and delete entries. It contains these topics:


See Also:

Chapter 3, "Directory Concepts and Architecture" for an overview of directory entries, directory information trees, distinguished names, and relative distinguished names

Bulk tools are discussed in Chapter 9, "Using Bulk Tools".

8.1 Managing Entries by Using Oracle Directory Manager

This section contains these topics:

8.1.1 Searching for Entries by Using Oracle Directory Manager

You can display all entries by using the navigator pane, or search for one or more specific entries by using the Oracle Directory Manager search feature.

To display an entry, in the navigator pane, expand Oracle Internet Directory Servers, then directory server instance, then Entry Management.

The root of the tree is listed first, then the second level, and so forth, moving from left to right. The subtree lists the RDN of each entry in hierarchical order. To see the lower level entries within any subtree, click the plus sign (+) to the left of the parent entry.

To search for a directory entry:

  1. In the navigator pane, expand Oracle Internet Directory Servers, then directory server instance, then Entry Management. The Search fields appear in the right pane.

  2. In the Root of the Search field, enter the DN of the root of your search.

    For example, suppose you want to search for an employee who works in the Manufacturing division in the IMC organization in the Americas. The DN of the root of your search would be:

    ou=Manufacturing,ou=Americas,o=IMC,c=US
    
    

    You would therefore type that DN in the Root of the Search text box.

    You can also select the root of your search by browsing the directory information tree (DIT). To do this:

    1. Click Browse to the right of the Root of the Search field. The Select Distinguished Name (DN) Path: Tree View dialog box appears.

    2. Click the plus sign (+) next to tree view to display its entries.

    3. Continue navigating to the entry that represents the level you want for the root of your search.

    4. Select that entry, then click OK. The DN for the root of your search appears in the Root of the Search text box in the right pane.

  3. In the Max Results (entries) box, type the maximum number of entries you want your search to retrieve. The default is 200. The directory server retrieves the value you set, up to 1000.

  4. In the Max Search Time (seconds) box, type the maximum number of seconds for the duration of your search. The value you enter here must be at least that of the default, namely, 25. The directory server searches for the amount of time you specify, up to one hour.

  5. In the Search Depth list, select the level in the DIT to which you want to search.

    The options are:

    • Base: Retrieves a particular directory entry. Along with this search depth, you use the search criteria bar to select the attribute objectClass and the filter Present.

    • One Level: Limits your search to all entries beginning one level down from the root of your search.

    • Subtree: Searches entries within the entire subtree, including the root of your search.

  6. In the Search Criteria box, use the lists and text fields on the search criteria bar to focus your search.

    1. From the list at the left end of the search criteria bar, select an attribute of the entry for which you want to search. Because not all attributes are used in every entry, be sure that the attribute you specify actually corresponds to one in the entry for which you are looking. Otherwise, the search will fail.

    2. From the list in the middle of the search criteria bar, select a filter. Options described in Table A-45.

    3. In the text box at the right end of the search criteria bar, type the value for the attribute you just selected. For example, if the attribute you selected was cn, you could type the particular common name you want to find.

  7. To further refine your search, use the buttons in the Search Criteria box to enhance the search criteria bar. These are described Table A-46.

  8. Click Search. The results of your search appear in the Distinguished Name box.


See Also:

"Viewing Active Server Instance Information" for instructions on setting the number of entries to display in searches, and to set the time limit for searches

8.1.2 Viewing Attributes for a Specific Entry by Using Oracle Directory Manager

Once you have displayed the results of your search, click the entry whose attributes you want to view. An Entry dialog box displays the attributes for that entry.

Some attributes can also be DNs. For example, one attribute for a given employee might be that employee's manager who, in turn, has a DN. In this case, when you display the Entry dialog box for the employee, you would see a Browse button next to the Manager text box. To find information about that manager, click Browse to display the Directory: Entry Management dialog box, then follow the steps mentioned in "Searching for Entries by Using Oracle Directory Manager".


See Also:

"Viewing All Directory Attributes by Using Oracle Directory Manager" for instructions about how to view all attributes in the directory

8.1.3 Adding Entries by Using Oracle Directory Manager

This section tells you how to add entries for users and groups.


Note:

When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.

8.1.3.1 Adding a New Entry by Using Oracle Directory Manager

To add or delete entries with Oracle Directory Manager, you must have write access to the parent entry and you must know the DN for the new entry.

To add a new entry:

  1. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance.

  2. Select Entry Management.

  3. On the toolbar, click Create. The New Entry dialog box appears.

  4. In the Distinguished Name field, type the full DN. You can also click Browse to locate and select the DN of the parent for the entry you want to add. The entry you select appears in the Distinguished Name field. To the left of that parent DN, type the RDN for your new entry, followed by a comma.

  5. To specify an object class for the new entry, next to the Object Classes box, click Add. The Super Class Selector dialog box appears.


    Note:

    You must assign user entries to the inetOrgPerson object class in order for the entries to appear in the Oracle Internet Directory Self-Service Console.

  6. In the Super Class Selector dialog box, select an object class, then click Select. As you select from the object class list, mandatory and optional attributes populate the windows in the tab pages in the lower half of the New Entry dialog box. You must enter values into the mandatory attributes fields. You are not required to enter values into the optional attributes fields.

  7. When you have selected the object classes and provided values for the appropriate attributes, click OK.

8.1.3.2 Adding an Entry by Copying an Existing Entry in Oracle Directory Manager

You can use Oracle Directory Manager to create a new entry by copying from an existing entry and changing its DN. When you do this, you should also change the attributes, such as name and address, so that they correspond to the new DN. To add an entry, you must have write access to its parent.


Tip:

You can find a template for the new DN by looking up other similar entries in the search pane.

To add an entry by copying an existing entry:

  1. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance.

  2. Select Entry Management.

  3. In the right pane, the search interface appears. Use it to search for an entry that you want to use as a template.

  4. From the entries retrieved, double-click one that you want to use as your template. The Entry dialog box for that entry appears.

  5. In the Entry dialog box, click Create Like. A New Entry: Create Like dialog box appears.

  6. Change critical fields to tailor this entry to the one that you want to create. You must always change the DN and the common name in this operation, or the pane will not save your new entry data. For example, if you create an entry for Henri Latrobe by using the entry for Henri Latour as the template, then you have to change cn=Henri Latour in the DN to cn=Henri Latrobe. You also must change any other attributes that must be unique, such as employee number and telephone number.

  7. Click OK to save your changes.


See Also:

The online help for this dialog box for details about adding information into fields

8.1.3.3 Example: Adding a User Entry by Using Oracle Directory Manager

In this example, we create a user named Anne Smith and assign her a password.

  1. Login as the administrator.

  2. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance.

  3. Select Entry Management.

  4. On the toolbar, click Create. The New Entry dialog box appears.

  5. In the Distinguished Name field, type the full DN. You can also click the Browse button to locate the DN of the parent for this entry, then type the RDN—namely, cn=Anne Smith—followed by a comma, to the left of that parent DN.


    Note:

    You cannot use a tilde (~) in a user name.

  6. To the right of the Object Classes box, click Add. The Super Class Selector dialog box appears.

  7. In the Super Class Selector dialog box, select the person object class, then click Select. This returns you to the New Entry dialog box.

  8. In the New Entry dialog box, click the Optional Properties tab, and scroll to the User Password window.

  9. Type the password for Anne Smith.

8.1.4 Modifying Entries by Using Oracle Directory Manager

You can add auxiliary object classes to an existing entry.

You can add optional, but not mandatory, attributes to an object class already in use by entries. If you add optional attributes to an object class already in use, then no special rules apply, and they are added as empty attributes to those entries.


Note:

When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.

To modify an entry:

  1. Perform a search for the entry you want to modify as described in "Searching for Entries by Using Oracle Directory Manager".

  2. In the Distinguished Name box of the right pane, select the entry you want to modify.

  3. Click Edit. The Entry dialog box appears.

  4. Modify the appropriate fields, then choose Select the Properties tab page. If you do not see the attributes you want to add or modify, then, at the top of the tab page, select View Properties: All.

  5. In the Properties tab page, modify the values of any editable attributes.

  6. Click Apply.

8.1.4.1 Example: Modifying a User Entry by Using Oracle Directory Manager

In this example, we modify the password for the entry we created for Anne Smith in the section "Example: Adding a User Entry by Using Oracle Directory Manager".

  1. Perform a search for the Anne Smith entry.

  2. In the right pane, in the Distinguished Name box, select the entry for Anne Smith.

  3. Click Edit.

  4. In the Entry dialog box, scroll to the User Password window and modify the value.

  5. Click OK.

8.1.5 Managing Entries with Attribute Options by Using Oracle Directory Manager

This section tells you how to add, modify, and delete attribute options.


See Also:

"Searching for Entries by Using Oracle Directory Manager" for instructions on searching for entries with attribute options

8.1.5.1 Adding an Attribute Option to an Existing Entry by Using Oracle Directory Manager


Note:

In Oracle Internet Directory 10g (10.1.4.0.1), Oracle Directory Manager does not allow you to add an attribute option to an entry when you create the entry. You can use Oracle Directory Manager to add attribute options only to already existing entries.

To add an attribute option to an existing entry:

  1. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance, and Entry Management.

  2. Select the entry to which you want to add an attribute option. The corresponding tab pages appear in the right pane.

  3. In the right pane, in the Properties tab page, in the View Properties field, select Advanced. The Properties tab page changes accordingly.

  4. In the Attribute field, select the attribute to which you want to add the option, for example, ou.

  5. In the Attribute Options field, enter the attribute option, for example, lang-en.

  6. In the Attribute Value field, enter the value of the attribute option you just specified, for example, Server Technologies. To add more than one attribute value for the specified attribute option, separate the values by using a semicolon.

  7. Click Apply.

8.1.5.2 Modifying an Attribute Option by Using Oracle Directory Manager

To modify an attribute option:

  1. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance, and Entry Management.

  2. Select the entry whose attribute option you want to modify. The corresponding tab pages appear in the right pane.

  3. In the Properties tab page, in the View Properties field, select either Only Non-null Values or All.

  4. Scroll to the field containing the attribute option you want to modify.

  5. Modify the value in the field.

  6. Click Apply.

8.1.5.3 Deleting an Attribute Option by Using Oracle Directory Manager

To delete an attribute option:

  1. In the navigator pane, expand each of the following objects in succession: Oracle Internet Directory Servers, directory server instance, and Entry Management.

  2. Select the entry from which you want to delete an attribute option. The corresponding tab pages appear in the right pane.

  3. In the Properties tab page, in the View Properties field, select either Only Non-null Values or All.

  4. Scroll to the field containing the attribute option you want to delete.

  5. Delete the value in the field.

  6. Click Apply.

8.2 Managing Entries by Using Command-Line Tools

This section points you to the command-line tools you can use in managing entries. It also provides several examples of entry management by using command-line tools. It contains these topics:

Bulk tools are discussed in Chapter 9, "Using Bulk Tools".

8.2.1 Command-Line Tools for Managing Entries

Table 8-1 lists each of the command-line tools for managing entries, and tells you where to find syntax and usage notes for each one.

Table 8-1 Command-Line Tools for Managing Entries

Tool Task(s) Syntax and Usage Notes

ldapadd

Add entries one at a time.

Add new configuration set entries.

Configure a server with an input file.

The ldapadd command-line tool reference in Oracle Identity Management User Reference

ldapaddmt

Add several entries concurrently by using this shared server tool.

The ldapaddmt command-line tool reference in Oracle Identity Management User Reference

ldapbind

Authenticate a user or client to a directory server.

Verify that you can connect a client to a server.

The ldapbind command-line tool reference in Oracle Identity Management User Reference

ldapcompare

Compare attribute values you specify with those in a directory entry.

The ldapcompare command-line tool reference inOracle Identity Management User Reference

ldapdelete

Delete entries.

The ldapdelete command-line tool reference in Oracle Identity Management User Reference

ldapmoddn

Modify the DN or RDN of an entry.

Rename an entry or a subtree.

Move an entry or a subtree under a new parent.

The ldapmoddn command-line tool reference in Oracle Identity Management User Reference

ldapmodify

Create, update, and delete attribute data for an entry.

Modify configuration set entries.

Modify DN or RDN of an entry.

The ldapmodify command-line tool reference inOracle Identity Management User Reference

ldapmodifymt

Modify several entries concurrently by using this shared server tool.

The ldapmodifymt command-line tool reference in Oracle Identity Management User Reference

ldapsearch

Search for directory entries.

The ldapsearch command-line tool reference in Oracle Identity Management User Reference


8.2.1.1 Example: Adding a User Entry by Using ldapadd

The following example shows an LDIF file, named entry.ldif, for the entry for an employee named John:

dn: cn=john, c=us
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: john
cn;lang-fr:Jean
cn;lang-en-us:John
sn: Doe
jpegPhoto: /photo/john.jpg
userpassword: welcome

This file contains the cn, sn, jpegPhoto, and userpassword attributes.

For the cn attribute, it specifies two options: cn;lang-fr, and cn;lang-en-us. These options return the common name in either French or American English.

For the jpegPhoto attribute, it specifies the path and file name of the corresponding JPEG image you want to include as an entry attribute.


Note:

  • When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.

  • You cannot insert a tilde (~) in a user name.


8.2.1.2 Example: Modifying a User Entry by Using ldapmodify

The following example changes the password for a user named Audrey from welcome to audreyspassword. As in the previous example, the data for this user entry is in the entry.ldif file. This file contains the following:

dn: cn=audrey,c=us
changetype: modify
replace: userpassword
userpassword: audreyspassword

Issue this command to modify the file:

ldapmodify -p 389 -v -f entry.ldif

where -v specifies verbose mode.


Note:

When you add or modify an entry, the Oracle directory server does not verify the syntax of the attribute values in the entry.

8.2.2 Managing Entries with Attribute Options by Using Command-Line Tools

This section provides examples of how to add and delete attribute options, and how to search for entries with attribute options.

8.2.2.1 Example: Adding an Attribute Option by Using ldapmodify

Suppose that you were adding the Spanish equivalent of an entry for John, and that the data for this user entry is in the entry.ldif file. This file contains the following:

dn: cn=john,c=us
changeType: modify
add: cn;lang-sp
cn;lang-sp: Juan

Issue this command to modify the file:

ldapmodify -p 389 -v -f entry.ldif

8.2.2.2 Example: Deleting an Attribute Option by Using ldapmodify

The following example deletes the cn;lang-fr attribute option from the entry for John. As in the previous example, assume that the data for this user entry is in the entry.ldif file. This file contains the following:

dn: cn=john, c=us
changetype: modify
delete: cn;lang-fr
cn;lang-fr: Jean

Issue this command to modify the file:

ldapmodify -p 389 -v -f entry.ldif

8.2.2.3 Example: Searching for Entries with Attribute Options by Using ldapsearch

The following example retrieves entries with common name (cn) attributes that have an option specifying a language code attribute option. This particular example retrieves entries in which the common names are in French and begin with the letter R.

ldapsearch -p 389 -h myhost -b "c=US" -s sub "cn;lang-fr=R*"

Suppose that, in the entry for John, no value is set for the cn;lang-it language code attribute option. In this case, the following example fails:

ldapsearch -p 389 -h myhost -b "c=us" -s sub "cn;lang-it=Giovanni"

8.3 Managing Knowledge References and Referrals

A knowledge reference, also called a referral, is represented in the directory as a particular type of entry. When you create a knowledge reference entry, you associate it with the referral object class the and extensibleObject object class. Typically, you create knowledge reference entries at the place in the DIT where you want to establish the partition.

A knowledge reference provides users with a referral containing an LDAP URL. You enter these URLs as values for the ref attribute. There can be multiple ref attributes specified for any knowledge reference entry. Similarly, there can be multiple knowledge reference entries in the DIT.


See Also:

"Directory Partitioning" for an overview of knowledge references and a description of a smart knowledge reference and a default knowledge reference

This section contains these topics:

8.3.1 Configuring Smart Referrals

A search result can contain regular entries along with knowledge references. When a user performs a search operation, Oracle Internet Directory looks for the knowledge reference entry within the specified scope of the search. If it finds the knowledge reference, then Oracle Internet Directory returns a referral to the client.

If a user performs an add, delete, or modify operation on an entry located below the knowledge reference entry, then Oracle Internet Directory returns the referral.

For example, suppose you want to partition the DIT based on the geographical location of the directory servers. In this example, assume that:

  • The c=us naming context is held locally on Server A and Server B in the United States.

  • The c=uk naming context is held locally on Server C and Server D in the United Kingdom.

In this case, you would configure knowledge references between these two naming contexts as follows:

  1. On Server A in the United States, configure a knowledge reference for the c=uk object on Server C and Server D:

    dn: c=uk
    c: uk
    ref: ldap://host C:389/c=uk
    ref: ldap://host D:686/c=uk
    objectclass: top
    objectclass: referral
    objectClass: extensibleObject
    
  2. Configure a similar knowledge reference on Server C in the United Kingdom for the c=us object on Server A and Server B:

    dn: c=us
    c: us
    ref: ldap://host A:4000/c=us
    ref: ldap://host B:5000/c=us
    objectclass: top
    objectclass: referral
    objectClass: extensibleObject
    

Results:

  • A client querying Server A with base o=foo,c=uk receives a referral.

  • A client querying Server C with base o=foo,c=us receives a referral.

  • An add operation of o=foo,c=uk on either Server A or Server B fails. Instead, Oracle Internet Directory returns a referral.

8.3.2 Configuring Default Referrals

Oracle Internet Directory uses the namingcontext attribute in the DSE to determine every directory naming context held locally by the server. Be sure that the namingContext attribute correctly reflects the naming context information.

You specify default referrals by entering a value for the ref attribute in the DSE entry. If the ref attribute is not in the DSE entry, then no default referral is returned.

When configuring a default referral, do not specify the DN in the LDAP URL.

For example, suppose that the DSE entry on Server A contains the following namingContext value:

namingcontext: c=us

Further, suppose that the default referral is:

Ref: ldap://host PQR:389

Now, suppose that a user enters an operation on Server A that has a base DN in the naming context c=canada, for example:

ou=marketing,o=foo,c=canada

This user would receive a referral to the host PQR. This is because Server A does not hold the c=canada base DN, and the namingcontext attribute in its DSE does not hold the value c=canada.


See Also:

"Knowledge References and Referrals" for a conceptual discussion of knowledge references

8.3.3 Client-Side Referral Caching

Referral caching is the process of storing referral information so that it can be easily accessed again and again. Suppose that a client queries Server A, which returns a referral to Server B. The client chases this referral and contacts Server B which performs the operation and returns the results to the client. Without referral caching, the next time the client makes the same query to Server A, the entire procedure is repeated, an unnecessary consumption of time and system resources.

However, if the referral information can be cached, then, in each subsequent query, the referral information can be obtained from cache and Server B can be contacted directly. This speeds up the operation.

Client-side referral caching enables each client to cache this referral information and use it to speed up of referral processing.

8.3.3.1 How Client-Side Referral Caching Works

Referral entries are stored in a configuration file on the client. When a client establishes a session, it reads the referral information from this configuration file and stores them in a cache. This cache remains static, with no further updates being added during the session. From this point on, for every operation, the client looks up referral information in the cache.

The directory administrator prepares this configuration file for clients to use.


Note:

The configuration file is optional for clients. If a file is not present, then client operations involving referrals still behave correctly. Thus it is not mandatory for administrator to prepare this file. The advantage of using the configuration file is that it speeds up the client/server operations involving referrals.

The configuration file consists of one or more referral sets. Each referral set consists of:

  • The host name where a particular directory server is running

  • One or more referral entries residing on that server

Each referral entry consists of a sequence of lines, each of which corresponds to one referral URL. The line separator is CR LF or LF.

ref_file=ref_file_content
ref_file_content=1*(referral_set)
referral_set=hostname       SEP      ref_entry_set   SEP
ref_entry_set=ref_entry     *(SEP    ref_entry)
ref_entry=1*(referralurl    SEP)
SEP=CR LF / LF
CR=0x0D
LF=0x0A

For example, consider two referral entries in a directory server running on host serverX:

dn: dc=acme, dc=com 
ref: ldap://serverA:389/dc=acme, dc=com 
ref: ldap://serverB:389/dc=acme, dc=com 

dn: dc=oracle, dc=com 
ref: ldap://serverC:389/dc=oracle, dc=com 
ref: ldap://serverD:389/dc=oracle, dc=com

Consider the following referral entry in a directory server running on host serverY:-

dn: dc=fiction, dc=com
ref: ldap://serverE:389/dc=fiction, dc=com 

The corresponding referral.ora file looks like this:

ServerX
ldap://serverA:389/dc=acme, dc=com
ldap://serverB:389/dc=acme, dc=com

ldap://serverC:389/dc=oracle, dc=com
ldap://serverD:389/dc=oracle, dc=com

ServerY
ldap://serverE:389/dc=fiction, dc=com