1. Create an LDIF file with the new attribute definition using a text editor. Save the file as myschema.ldif.
    dn: cn=schema 
    changetype: modify 
    add: attributeTypes 
    attributeTypes: ( contractorStatus-OID NAME 'contractorStatus'
      EQUALITY booleanMatch 
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 
      SINGLE-VALUE 
      USAGE userApplications 
      X-ALLOWED-VALUES ’Y’ ’N’ ’y’ ’n’ 
      X-ORIGIN 'PingDirectory Server Example' )
  2. Use ldapmodify to add the attribute.
    $ bin/ldapmodify --filename myschema.ldif
  3. Verify the addition by displaying the attribute using ldapsearch.
    $ bin/ldapsearch --baseDN cn=schema --searchScope base \
      --dontwrap "(objectclass=*)" attributeTypes | grep 'contractorStatus'
  4. You can view the custom schema file at <server-root>/config/schema/99-user.ldif. You should see the following:
    dn: cn=schema 
    objectClass: top 
    objectClass: ldapSubentry 
    objectClass: subschema 
    cn: schema 
    attributeTypes: ( contractorStatus-OID
      NAME 'contractorStatus' 
      EQUALITY booleanMatch 
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 
      SINGLE-VALUE 
      USAGE userApplications 
      X-ORIGIN 'PingDirectory Server Example' )