Copying an object class
Use this information to copy an object class. If you have not done so already, expand Schema management in the navigation area, then click Manage object classes. To copy an object class:
- Click the radio button next to the object class that you want to copy.
- Click Copy.
- Select a tab:
- Use the General tab to:
- Change the object class name. The default name is the copied object class name appended with the word COPY. For example tempPerson is copied as tempPersonCOPY.
- Change the Description.
- Change the OID. The default OID is the copied object class OID appended with the word COPY. For example tempPerson-oid is copied as tempPerson-oidCOPY.
- Change the Superior object class. 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 tempEmployeeCOPY might be ePerson.
- Change the Object class type. Select an object class type. See Object classes for additional information about object class types.
- Click the Attributes tab to change the required and the optional attributes for the object class and view the inherited attributes, or click OK to apply your changes or click Cancel to return to Manage object classes without making any changes.
- Use the Attributes tab to:
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 apply the changes or click Cancel to return to Manage object classes without making any changes.
To view the object classes contained in the schema using the command line, issue the command:
ldapsearch -b cn=schema -s base objectclass=* objectclassesSelect the object class that you want to copy. Use an editor to change the appropriate information and save the changes to <filename>. Issue the following command:
ldapmodify -D <adminDN> -w <adminPW> -i <filename>where <filename>contains:
dn: cn=schema changetype: modify add: objectclasses objectclasses: ( <mynewobjectClass-oid> NAME '<mynewObjectClass>' DESC '<A new object class I copied for my LDAP application>' SUP '<superiorclassobject>'<objectclasstype> MAY (attribute1> $ <attribute2> $ <attribute3>) )
Parent topic:
Schema tasks