Adding Custom Attributes to ApacheDS Server

user1646481 picture user1646481 · Nov 14, 2012 · Viewed 9.4k times · Source

I am using ApacheDS Server as an LDAP Server. I have created a custom attribute to use in my LDAP structure that I have defined. I have created a schema and inside the Schema I have defined an ObjectClass and an attribute called dateOfBirth. I exported the Schema and imported it into the DIT of ApacheDS. The schema is imported and can view the dateOfBirth attribute.

However, when I try to add it I get a warning saying:

Warning according to the schema attribute dateOfBirth is not allowed.

Do you still want to add the new value?

The dateOfBirth is to store information about a Person. The Person object class in LDAP is called inetOrgPerson ObjectClass. What is the best way to add the dateOfBirth in order to use it?

Answer

MADHAIYAN M picture MADHAIYAN M · Oct 25, 2013

You can add custom object and attributes(should not exist) in Apache DS using Apache directory studio.

The Steps are

  1. Open the Apache Directory Studio.
  2. Go to the Schema Editor perspective.
  3. Right click in project pane and create new schema project.
  4. Choose offline/online and give project name.
  5. Open the connection
  6. Right click on schema pane and create new schema with unique name(ex. test123).
  7. Under the schema can create new attributes and object for those attributes.(look at existing objects for reference)
  8. Once done everything, can export as .ldif file (let say test.ldif)
  9. Now go to the LDAP Browser perspective.
  10. Right on ou=schema object and click on import as LDIF.
  11. import the LDIF file which is exported from schema project(step-8).
  12. Successfully done and refresh the ou=schema object you can see the added object.