Oracle Internet Directory Administrator's Guide Release 9.2 Part Number A96574-01 |
|
This chapter explains how to view, add, modify, and delete entries.
This chapter contains these topics:
See Also:
Chapter 2, "Concepts and Architecture" for an overview of directory entries, directory information trees, distinguished names, and relative distinguished names |
This section contains these topics:
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 > directory server instance > Entry Management to display its subtree.
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:
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:
The options are:
objectClass
and the filter Present
.See Also:
"Configuring Searches" for instructions on setting the number of entries to display in searches, and to set the time limit for searches |
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 |
This section tells you how to add entries for individuals 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. |
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:
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.
To add an entry by copying an existing entry:
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.In this example, we create a user named Anne Smith and assign her a password.
cn=Anne Smith
, followed by a comma, to the left of that parent DN.person
object class, then click Select. This returns you to the New Entry dialog box.userPassword
window.A group entry is one that contains a list of entries, for example, an e-mail list. You associate it with either the groupOfNames
or groupOfUniqueNames
object class, which has the object class orclPrivilegeGroup
as a subclass.
You determine membership in the group by adding DNs to the multivalued attribute member
if the entry belongs to the groupOfNames
object class, or uniqueMember
if the entry belongs to the groupOfUniqueNames
object class.
To add a group entry:
top
object class, then click the Select button. The top
object class appears in the Object Classes box of the New Entry dialog box.If you selected the groupOfNames
object class, a Browse button appears next to some of the fields, for example, the member field on the Mandatory Properties tab page. To enter a mandatory property by browsing:
See Also:
|
Oracle Directory Manager is governed by standard LDAP conventions, including the following:
For example, if you configure an entry to use object classes Person
and Organizational Role
, you cannot later add another object class to this entry.
To modify an entry:
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".
userPassword
window and modify the value.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 |
To add an attribute option to an existing entry:
ou
.lang-en
.Server Technologies
. To add more than one attribute value for the specified attribute option, separate the values by using a semicolon.To modify an attribute option:
To delete an attribute option:
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:
The following table lists each of the command-line tools, and tells you where to find syntax and usage notes for each one.
The following example shows an LDIF file, named entry.ldif
, for the user 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. |
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. |
This section provides examples of how to add and delete attribute options, and how to search for entries with attribute options.
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
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
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
This section lists and describes some of the more common tasks you perform with bulk tools.
This section contains these topics:
Note: If you do not use the bulkload utility to populate the directory, then you must run the oidstats.sh tool to avoid significant search performance degradation. |
See Also:
|
To import an LDIF file, you use the bulkload utility. This section discusses the tasks to process an LDIF file through bulkload.
Note: The bulkload utility expects an empty directory and will either fail or overwrite if there are existing entries. Before performing a bulk load, stop the Oracle Internet Directory processes. See Chapter 3, "Preliminary Tasks and Information" for instructions on stopping directory server instances. |
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
This section contains these topics:
Before you import the file, back up the Oracle database server as a safety precaution.
See Also: Oracle9i User-Managed Backup and Recovery Guide in the Oracle9i Database Server Documentation Library |
To use bulkload and the other shell script tools that have commands that end with.sh
, you must provide the Oracle Internet Directory password. The default password is ods
, although the system administrator can change it by using the OID Database Password Utility.
On UNIX, the bulkload.sh
file usually resides in
$
ORACLE_HOME/ldap/bin
. On Windows NT, this file usually resides in
ORACLE_HOME\ldap\bin
.
Check the input file by typing:
bulkload.sh -connect net_service_name -check path_to_ldif-filename
All schema violations are reported in
$
ORACLE_HOME/ldap/log/schemacheck.log
If any violations are detected in the input file, use an ASCII text file editor to fix or remove them. If there are any duplicate entries, their DNs are logged in $
ORACLE_HOME/ldap/log/duplicate.log
.
After you have fixed any errors in the input file, rerun bulkload with the -generate
option as shown in the following example. During this step, LDIF data is converted to SQL*Loader specific format.
bulkload.sh -connect net_service_name -generate ldif-filename
All loading errors are reported in
$
ORACLE_HOME/ldap/log
When this command completes successfully, it generates *.dat
files in the $ORACLE_HOME/ldap/load
directory to be used by SQL*Loader in -load
mode. Do not modify these files.
After you have generated the input files, rerun bulkload with the -load
option. During this step, the *.dat
files, which are in Oracle SQL*Loader specific format, are loaded into the database and the attribute indexes are created. The syntax is:
bulkload.sh -connect net_service_name -load
All loading errors are reported in the $
ORACLE_HOME/ldap/log/directory
with the file extension .bad
.
If bulk loading fails, the database could be left in an inconsistent state. It may be necessary to restore the database to its state prior to the bulk loading operation.
Converting directory data to LDIF by using LDIF Writer makes the data available for loading into a new node in a replicated directory or into another node for backup storage.
The bulkmodify utility enables you to modify a large number of existing entries efficiently.
The bulkdelete utility enables you to delete an entire subtree efficiently.
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:
"Partitioning" for an overview of knowledge references and a description of smart knowledge references and default knowledge references |
This section contains these topics:
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:
c=us
naming context is held locally on Server A and Server B in the United States.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:
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
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:
o=foo,c=uk
receives a referral.o=foo,c=us
receives a referral.o=foo,c=uk
on either Server A or Server B fails. Instead, Oracle Internet Directory returns a referral.Oracle Internet Directory uses the namingcontext
attribute in the DSE to determine all the naming contexts 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:
"About Knowledge References and Referrals" for a conceptual discussion of knowledge references |
|
Copyright © 1999, 2002 Oracle Corporation. All Rights Reserved. |
|