In the New Attribute Type dialog box, select the Indexed box.

Managing Directory Schema 20-19 ■ Allows telephonenumber, givenname, and myattr as optional attributes Note that all the attributes mentioned must exist before the execution of the command. To create an abstract object class, follow the previous example, replacing the word STRUCTURAL with the word ABSTRACT. Adding a New Attribute to an Auxiliary or User-Defined Object Class by Using Command-Line Tools To add a new attribute to either an auxiliary object class or a user-defined structural object class, use ldapmodify. This example deletes the old object class definition and adds the new definition in a compound modify operation. The change is committed by the directory server in one transaction. Existing data is not affected. 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.16.840.1.113894.9999.12345 NAME country SUP top STRUCTURAL MUST c MAY searchGuide description - add: objectclasses objectclasses: 2.16.840.1.113894.9999.12345 NAME country SUP top STRUCTURAL MUST c MAY searchGuide description changes To load the file, enter this command: ldapmodify -D cn=orcladmin -q -h myhost -p 3060 -f new_attribute.ldif Modifying Object Classes by Using Command-Line Tools To add or modify schema components, use ldapmodify. Adding and Modifying Attributes by Using ldapmodify To add a new attribute to the schema by using ldapmodify, type a command similar to the following at the system prompt: ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name The LDIF file contains data similar to this: dn: cn=subschemasubentry See Also: The ldapmodify command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management 20-20 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory changetype: modify add: attributetypes attributetypes: 1.2.3.4.5 NAME myattr SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 To specify an attribute as single-valued, include in the attribute definition entry in the LDIF file the keyword SINGLE-VALUE with surrounding white space. You can find a given syntax Object ID by using either Oracle Directory Services Manager or the ldapsearch command line tool. Deleting Attributes by Using ldapmodify To delete an attribute by using ldapmodify, type a command similar to the following at the system prompt: ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name The LDIF file contains data similar to this: dn: cn=subschemasubentry changetype: modify delete: 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 Services Manager or the ldapsearch command line tool. Indexing an Attribute for Which No Data Exists by Using ldapmodify After you define a new attribute in the schema, you can add it to the catalog entry by using ldapmodify. See Also: ■ The ldapmodify command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management for a detailed explanation of ldapmodify and its options ■ Viewing Syntaxes by Using by Using ldapsearch on page 20-26 for instructions on how to view syntaxes by using either Oracle Directory Services Manager or ldapsearch Note: You can delete only user-defined attributes. Do not delete attributes from the base schema. See Also: ■ The ldapmodify command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management for a detailed explanation of ldapmodify and its options ■ Viewing Syntaxes by Using by Using ldapsearch on page 20-26 or Viewing Syntaxes by Using Oracle Directory Services Manager on page 20-17 for instructions on how to view syntaxes