Page created: 22 Jul 2020
|
Page updated: 1 Feb 2021
| 2 min read
8.2 Product PingDirectory LDAP Standards, specifications, and protocols Directory Capability Product documentation Content Type Administration User task IT Administrator Administrator Audience Software Deployment Method
-
Assume that you have defined the
contractorAddress
attribute, create an LDIF file called contractorAddress-attr.ldif with the following content:dn: cn=schema changetype: modify add: attributeTypes attributeTypes: ( contractor-OID NAME 'contractorAddress' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE USAGE userApplications X-ORIGIN 'user defined' X-SCHEMA-FILE ’98-custom-schema.ldif’ ) X-ORIGINS ’user defined’ X-SCHEMA-FILE ’98-custom-schema.ldif’ )
-
Add the attribute using ldapmodify.
$ bin/ldapmodify --filename contractorAddress-attr.ldif
-
Next, create an LDIF file to modify the contractor objectclass to allow this
attribute. When doing this, you are just re-adding the updated
objectClass
and the Directory Server will handle the proper replacement of the existing object class with the new one. Create a file called contractor-oc.ldif. Make sure that the lines are not wrapped, theobjectClasses
line should be one continuous line.dn:cn=schema changetype: modify add: objectClasses objectClasses: ( contractor-OID NAME ’contractor’ DESC ’Contractor status information SUP top AUXILIARY MAY ( contractorStatus $ contractorAgency $ contractorAddress ) X-ORIGIN ’Directory Server Example’ X-SCHEMA-FILE ’98-custom-schema.ldif’ )
-
Update the
objectClass
using ldapmodify as follows:$ bin/ldapmodify --filename contractor-oc.ldif
- These schema changes will be replicated to all servers in the replication topology. Verify the change by looking at the config/schema/98-custom-schema.ldif file on the other servers in the replication topology to ensure that the changes are present.
-
If you need to add an index for this attribute, you can do so by using the
dsconfig command-line utility. You will need to do this
on each server in your topology unless you have server configuration groups set
up. See Configuring Server
Groups for more information.
$ bin/dsconfig create-local-db-index --backend-name userRoot \ --index-name contractorAddress --set index-type:equality
-
Rebuild the index online. This will not affect other indexes or entries since
there is no currently existing data for this attribute on any entry.
$ bin/rebuild-index --baseDN dc=example,dc=com --index contractorAddress