Oracle Internet Directory Administrator's Guide Release 2.0.6 A77230-01 |
|
This chapter covers topics in the following sections:
This section explains how to add and modify object classes. Oracle Corporation recommends that you understand the basic concepts of directory components before attempting to add to or modify the base schema in the directory.
See Also:
|
When you add directory entries, you select object classes for those entries. The attributes of an entry are determined by the object classes to which that entry is assigned.
Entries must be loaded in a top-down sequence. When you add an entry, all of its parent entries must already exist in the directory. Similarly, when you add entries that reference object classes and attributes, those referenced object classes and attributes must already exist in the directory schema. In most cases this will not be a problem since the directory server is delivered with a full set of standard directory objects.
The attributes an entry inherits from an object class may be either mandatory or optional. Optional attributes need not be present in the directory entry.
You can specify for any object class whether an attribute is mandatory or optional; however, the characteristic you specify is binding only for that object class. If you place the attribute in another object class, you can again specify whether the attribute is mandatory or optional for that object class. You can:
Administrators typically assign object classes to entries based on the attributes present in that object class. However, superclasses let you take advantage of inheritance--that is, the object classes selected for an entry have a hierarchy of superclasses from which they inherit mandatory and optional attributes.
When you add object classes, keep the following guidelines in mind:
top
as a superclass.
Listed below are the types of modifications you can make to an existing object class. The rules for these modifications are explained later in this section. You can perform any modifications through Oracle Directory Manager and through the command line tools.
It is generally not a good idea to modify object classes, except auxiliary object classes. If existing object classes do not have the attributes you need, it is better to create an auxiliary object class and associate the needed attributes with it.
You can make the following changes to an object class:
When you modify object classes, keep the following guidelines in mind:
There are also some limitations on deleting object classes:
This section discusses using Oracle Directory Manager to perform the administrative tasks described in the following sections:
You can specify your search for an object class by:
This section provides more details on how to enter an object class search.
To search for an object class:
orcl
, type those letters in the text box at the right end of the search criteria bar.
Table 6-1 Search Criteria Buttons
You can view properties of object classes as described in the following sections:
To view all object classes in the schema:
To see all the information in this pane, you can scroll horizontally and vertically.
To examine an individual object class and its attributes, select the Object Classes tab and double-click the object class in the list displayed in the panel. The properties of the selected object class appear in the Object Class dialog box:
Object classes from which attributes may be inherited are listed in the Super Class pane. The mandatory attributes are listed in the Mandatory Attributes window and optional attributes are listed in the Optional Attributes window. Each window indicates whether the attributes are indexed so that they can be used in a search expression.
To add object classes by using Oracle Directory Manager:
The New Object Class dialog box appears:
Alternatively, select an object class that is similar to one you would like to create, and then click the Create Like button. A window similar to the one shown above appears, but it includes the attributes of the selected object class. You can create the new object class using the selected one as a template.
Table 6-2 Fields for Adding a New Object Class
Field | Description |
---|---|
Name |
Name of the object class you are creating |
Object ID |
A standardized numerical sequence based on IETF standards. It must be unique. Normally this is derived from the identifier assigned by registration agencies, such as ANSI or ISO. If you are creating a new object class, assign an identifier that is sure to be unique, following the system agreed upon within your organization. |
Description |
This optional field is for your information only |
Type |
The type of object class: Abstract, Structural, Auxiliary, None. See Also: "Object Class Types" |
Super Class |
The class(es) from which you are deriving this new object class. The new object class will inherit all the attributes of the superclass(es) you select. All structural object classes must have |
Mandatory Attributes |
Attributes for which values must be entered |
Optional Attributes |
Attributes for which values may be entered |
You can add objects by clicking the buttons to the right of each window.
To modify an existing object class:
You can add attributes by clicking the buttons to the right of each window.
To delete an object class:
You can use command line tools to add or modify existing object classes in the directory schema. The command line tools enable you to use input files. Furthermore, the commands can be batched together in scripts.
To add or modify schema components, use ldapmodify.
To add a new object class schema component by using ldapmodify, at the system prompt type a command using the following syntax:
ldapmodify -h host -p port -f ldif_filename
In this example, the LDIF input file contains data similar to this:
dn: cn=subschemasubentry changetype: modify add: objectclasses objectclasses: ( 1.2.3.4.5 NAME 'myobjclass' SUP top STRUCTURAL MUST ( cn $ sn ) MAY ( telephonenumber $ givenname $ myattr ) )
The example above adds the structural object class named myobjclass
, giving it an object identifier of 1.2.3.4.5
, specifying top
as its superclass, requiring cn
and sn
as mandatory attributes, and allowing telephonenumber
, givenname
, and myattr
as optional attributes. Note that all the attributes mentioned must exist prior to the execution of the command.
Be sure to leave the mandatory space between the opening and closing parentheses and the object identifier.
To create an abstract object class, follow the above example, replacing the word STRUCTURAL
with the word ABSTRACT
.
To modify an auxiliary object class by adding a new attribute, use ldapmodify. The input file should be as follows:
dn: cn=subschemasubentry changetype: modify delete: objectclasses objectclasses: old value - add: objectclasses objectclasses: new value
For example, to add the attribute changes
to the existing object class country
, the input file would be:
dn: cn=subschemasubentry changetype: modify delete: objectclasses objectclasses: ( 2.5.6.2 NAME 'country' SUP top STRUCTURAL MUST c MAY
( searchGuide $ description ) ) - add: objectclasses objectclasses: ( 2.5.6.2 NAME 'country' SUP top STRUCTURAL MUST c MAY
( searchGuide $ description $ changes ) )
This section explains how to add, modify, and delete user-defined attributes. You need to understand attributes from a conceptual standpoint before attempting operations involving attributes.
In most cases, the attributes available in the base schema will suit the needs of your organization. However, if you decide to use an attribute not available in the base schema, you can add a new attribute, or modify an existing one.
The rules for adding attributes are:
The rules for modifying attributes are:
The rules for deleting attributes are:
If you delete an attribute that is referenced by any entry, that entry will no longer be available for directory operations.
Oracle Directory Manager allows you to manage attributes by performing tasks described in the following sections:
To search for attributes by using Oracle Directory Manager:
orcl
, you would type those letters in the text box at the right end of the search criteria bar and create the phrase Name Begins With orcl
.
You can use Oracle Directory Manager to add attributes as described in the following sections:
To add a new attribute by using Oracle Directory Manager:
The New Attribute Type dialog box appears:
This dialog box contains two tab pages--General and Advanced--with fields in which you enter values either by typing or selecting from menus.
Table 6-3 Fields for Adding Attributes in General Tab
In the Advanced tab page, enter values in each of the fields as described in Table 6-4.
To use this attribute, remember to declare it to be part of the attribute set for an object class. You do this by selecting Schema Management in the navigator pane, then, in the right pane, selecting the Object Classes tab page. For further instructions, see "Modifying Object Classes".
Note:
To add an attribute by copying an existing attribute:
This dialog box contains two tab pages--General and Advanced--with fields in which you enter values either by typing or selecting from menus.
To modify an attribute by using Oracle Directory Manager:
This dialog box contains two tab pages--General and Advanced--with fields in which you enter values either by typing or selecting from menus.
Oracle Internet Directory uses indexes to make attributes available for searches. When Oracle Internet Directory is installed, certain attributes are already indexed. If you want to use additional attributes in search filters, you must index them.
See Also:
"Indexing an Attribute by Using Command Line Tools" for instructions on using the command line catalog management tool |
This section covers topics in the following subsections:
To view indexed attributes:
To drop an index from an attribute:
You can use command line tools to perform the tasks described in the following sections:
To add a new attribute to the schema by using ldapmodify, type a command similar to the following at the system prompt:
ldapmodify -h host -p port -f ldif_filename
The input file contains data similar to this:
dn: cn=subschemasubentry changetype: modify add: attributetypes attributetypes: ( 1.2.3.4.5 NAME 'myattr' SYNTAX
'1.3.6.1.4.1.1466.115.121.1.38' )
You can find a given syntax Object ID by using either Oracle Directory Manager or the ldapsearch command line tool.
To view syntaxes by using Oracle Directory Manager:
Use ldapsearch on the subentry cn=subSchemaSubentry
.
Oracle Internet Directory uses indexes to make attributes available for searches. When Oracle Internet Directory is installed, the entry cn=catalogs
lists available attributes that can be used in a search.
If you want to use additional attributes in search filters, you must add them to the catalog entry. Only those attributes that have an equality matching rule can be indexed.
You can index a new attribute--that is, one for which no data exists in the directory--by using ldapmodify. You can index an attribute for which data already exists in the directory by using the Catalog Management tool. You can drop an index from an attribute by using ldapmodify, but the recommended method is by using the Catalog Management tool.
These topics are discussed in the following sections:
Once you have defined a new attribute in the schema, you can add it to the catalog entry by using ldapmodify.
To add an attribute for which no directory data exists by using ldapmodify, import an LDIF file by using ldapmodify. For example, to add a new attribute foo
that has already been defined in the schema, import the following LDIF file by using ldapmodify:
Dn: cn=catalogs Changetype: modify Add: orclindexedattribute Orclindexedattribute: foo
You should not use this method to index an attribute for which data exists in the directory. To index such an attribute, use the Catalog Management Tool.
To drop an index from an attribute by using ldapmodify, specify delete
in the LDIF file. For example:
Dn: cn=catalogs Changetype: modify Delete: orclindexedattribute Orclindexedattribute: foo
Use the Catalog Management Tool to index an attribute for which data already exists and to drop an index from an attribute.
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|