Add an object class
Web administration
If you have not done so already, expand Schema
management in the navigation area, then click Manage object classes. To create a new object class:
- Click Add.
Note:
You can also access this panel by expanding Schema management in the navigation area, then click Add an object class.
- At the General properties tab:
- Enter the Object class name. This is a required
field, and is descriptive of the function of the object class. For example, tempEmployee for an object class used to track
temporary employees.
- Enter a Description of the object
class, for example, The object class used for temporary
employees.
- Enter the OID for the object class. This is a required
field. See Object identifier (OID). If you do not have an OID, you can use
the Object class name appended with -oid. For example, if the object class name is tempEmployee, then the OID is tempEmployee-oid. You can change the value of this field.
- Select a Superior object class from
the drop-down list. This determines the object class from which other attributes
are inherited. Typically the Superior object class is top, however, it can be another object
class. For example, a superior object class for tempEmployee might be ePerson.
- Select an Object class type. See Object classes for additional information about object class types.
- Click the Attributes tab to specify the required and the optional
attributes for the object class and view the inherited attributes, or click OK to add the new object class or click Cancel to return to Manage object classes without making any changes.
- At the Attributes tab:
- Select an attribute from the alphabetical list of Available attributes and click Add to required to make the attribute required or click Add to optional to make the attribute optional for the object class.
The attribute is displayed in the appropriate list of selected attributes.
- Repeat this process for all the attributes you want to select.
- You can move an attribute from one list to another or delete
the attribute from the selected lists by selecting it and clicking the appropriate Move to or Delete button.
- You can view the lists of required and optional inherited attributes.
Inherited attributes are based on the Superior
object class selected on the General tab.
You cannot change the inherited attributes. However, if you change the Superior object class on the General tab, a different set of inherited attributes is displayed.
- Click OK to add the new object
class or click Cancel to return to Manage object classes without making any changes.
Note:
If you clicked OK on the General tab without adding
any attributes, you can add attributes by editing the new object class.
Command line
To add an object class using the command line, issue the following command:
ldapmodify -D <adminDN> -w <adminPW> -i <filename>
where <filename>contains:
dn: cn=Schema
changetype: modify
add: objectclasses
objectclasses: ( <myobjectClass-oid> NAME '<myObjectClass>' DESC '<An object class
I defined for my LDAP application>' SUP '<objectclassinheritance>'
<objectclasstype> MAY (<attribute1> $ <attribute2>))