Copy an attribute

Use either of the following methods to copy an attribute. The Web administration tool is the preferred method.

Web administration

If you have not done so already, expand Schema management in the navigation area, then click Manage attributes. To copy an attribute:

  1. Click the radio button next to the attribute that you want to copy.
  2. Click Copy.
  3. Change the Attribute name. The default name is the copied attribute name appended with the word COPY. For example tempID is copied as tempIDCOPY.
  4. Change a Description of the attribute, for example, The ID number assigned to a temporary employee.
  5. Change the OID. The default OID is the copied attribute OID appended with the word COPYOID. For example tempID-oid is copied as tempID-oidCOPYOID.
  6. Select a Superior attribute from the drop-down list. The superior attribute determines the attribute from which properties are inherited.
  7. Select a Syntax from the drop-down list. See Attribute syntax for additional information about syntax.
  8. Enter a Attribute length that specifies the maximum length of this attribute. The length is expressed as the number of bytes.
  9. Select the Allow multiple values checkbox to enable the attribute to have multiple values.
  10. Select a matching rule from the each of the drop-down menus for equality, ordering, and substring matching rules. See the Matching rules for a complete listing of matching rules.
  11. Click the IBM extensions tab to change additional extensions for the attribute, or click OK to apply your changes or click Cancel to return to Manage attributes without making any changes.
  12. At the IBM extensions tab:
  13. Click OK to apply your changes or click Cancel to return to Manage attributes without making any changes.
Note:
If you clicked OK on the General tab without adding any extensions, you can add or change extensions by editing the new attribute.

Command line

View the attributes contained in the schema issue the command:

ldapsearch -b cn=schema -s base objectclass=* attributeTypes IBMAttributeTypes

Select the attribute that you want to copy. Use an editor to change the appropriate information and save the changes to <filename>. Then issue the following command:

ldapmodify -D <adminDN> -w <adminPW> -i <filename>

where <filename>contains:

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( <mynewAttribute-oid> NAME '<mynewAttribute>' DESC '<A new
                 attribute I copied for my LDAP application> EQUALITY 2.5.13.2
                 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )
-
add: ibmattributetypes
ibmattributetypes: ( myAttribute-oid  DBNAME ( 'myAttrTable' 'myAttrColumn' )
                    ACCESS-CLASS normal LENGTH 200 )