Modifying the Schema

To Create a New Attribute  

202  

To Add an Attribute to an Object Class  

203  

To Change the Mode of an Attribute  

204  

To Create a New Object Class  

204  

The schema is the set of rules that describe the data that can be stored in the directory. It defines the type of entries, their structure and their syntax. The schema can be modified, though certain objects and attributes cannot be changed.

To view the schema definition, click Schema in the Directory Service property book Sections list. Two tables of schema elements are displayed:

directoryObject classes, as shown in FIGURE 6-6.

FIGURE  6-6 Object Classes

Attributes, as shown in FIGURE 6-7.
Click the folder icon for an object class to display its mandatory (M) and optional (O) attributes.

FIGURE  6-7 Attributes

This four-column attribute table shows:

The name of the attribute
The attribute syntax
Alias names for this attribute
Whether the attribute is a naming attribute (that is, an attribute that can be used in the distinguished name of an entry).

You can modify the schema by creating new object classes or attributes, or by modifying object classes and attributes. Deleting object classes or attributes is not advisable since there might be directory entries that use the existing definitions.


Note - There is no automatic check to make sure that schema modifications do not invalidate entries. Therefore, to minimize the risk of entries becoming invalid, restrict your changes to addition or modification of object classes or attributes.

The schema definition contains certain information that must not be changed because it is required by components of SIMS. However, the remaining part of the schema can be modified. The Admin Console does not permit you to modify the fixed part of the schema definition. The elements that you cannot modify are marked with the keyword frozen in the configuration files. You must not remove this keyword from any standard schema item. However, if you change the schema, you can add the frozen keyword to any new items you want to protect.


 

To Create a New Attribute



AdminConsole>SUN Directory Services>LDAP Server property book>Schema>Create pulldown>Attribute  

  1. In the Admin Console home page, click the Sun Directory Services icon to bring up the LDAP Server property book, and then click Schema in the Sections list.
  2. Choose Attribute from the Create pulldown.
  The Create Attribute window is displayed, as shown in FIGURE 6-8.

FIGURE  6-8 Create Attribute Window

  3. Specify the name of the attribute.
  4. If the attribute is known by another name, specify this in the Alias field.
  5. Choose the attribute syntax from the Syntax menu.
  6. Specify whether the new attribute can be used as a naming attribute.
  7. Click OK to save the new attribute definition.
  This change will take effect when you restart the slapd daemon.

 

To Add an Attribute to an Object Class



AdminConsole>SUN Directory Services>LDAP Server property book>Schema  

  1. In the Admin Console home page, click the Sun Directory Services icon to bring up the LDAP Server property book, and then click Schema in the Sections list.
  2. Select the object class to which you want to add an attribute.
  3. Choose Modify Class from the Selected menu.
  The Object Classes window is displayed, with the name of the object class you are modifying indicated in the General Properties section, as shown in FIGURE 6-9.

FIGURE  6-9 Defining an Object Class

  4. Select the attribute you want to add from the Defined Attributes list.
  5. Choose the mode of the attribute (Mandatory or Optional) from the pop-up menu.
  6. Click Add to add the attribute to the object class definition.
  7. Click OK to save the modified object class definition.
  This change will take effect when you restart the slapd daemon.

 

To Change the Mode of an Attribute



AdminConsole>SUN Directory Services>LDAP Server property book>Schema  

  1. In the Admin Console home page, click the Sun Directory Services icon to bring up the LDAP Server property book, and then click Schema in the Sections list.
  2. Select the object class to which you want to change an attribute.
  3. Choose Modify Class from the Selected menu.
  4. Select the attribute in the Class attributes list.
  Change the mode to Mandatory or Optional using the pop-up menu.
  5. Click OK.

 

To Create a New Object Class



AdminConsole>SUN Directory Services>LDAP Server property book>Create pulldown>Object Class  

  1. In the Admin Console home page, click the Sun Directory Services icon to bring up the LDAP Server property book, and then click choose Object Class from the Create menu.
  The Create Object Class window is displayed, as shown in FIGURE 6-9.
  2. Specify the name of the new object class.
  3. Specify the mandatory and optional attributes you want to include in this class:
  a. Select the attribute you want to include.
  b. Select the mode of the attribute (Mandatory or Optional) from the pop-up menu.
  c. Click Add to add the attribute to the object class definition.
  4. Click OK to save the modified object class definition.
  This change will take effect when you restart the slapd daemon.

Note - You cannot create new attributes in the schema while you are creating a new Object Class. Therefore you should add any new Attributes before attempting to create a new Object Class that will contain the new Attributes.



Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.