Sunday, July 3, 2011

How to create a new partition in ApacheDS

In LDAP servers, we might need to create new partitions to create the directory structure that we need, to store entries independent of the data inside other partitions and to have a root domain name that we desire.

I will take ApacheDS LDAP server as an example and demonstrate how to create a new partition.
  1. Edit the server.xml file that resides in the [apacheds_home]/conf to add a new partition entry.
    • locate the aforementioned file.
    • locate the "partitions" element - you can see the default partition dc=example,dc=com.
    • Just copy and paste the element "jdbmpartition" which defines the entry for partition with in the "partitions" element and change the name to the root domain name that you want to give to the new partition.
    • Lets say the new partition name is dc=wso2,dc=com.
  2. Now start the ApacheDS server by running the server starting script inside apacheds_home.
  3. Connect to the ApacheDS LDAP server from ApacheDirectory studio. You can find a guide for this from here.
  4. If you click on "RootDSE" in the LDAP Browser window, you will see an entry as dc=wso2,dc=com on the right hand side panel as shown below. But it is not yet shown as a new partition in the directory in LDAP browser window.

      5. To create a new partition out of that entry, we need to create a new conext entry of the object type "domain." For that;
    • Right click on "RootDSE" -> select "New" -> "New Context Entry"
    • From wizard, select "Create entry from scratch"
    • In the next window, select object class as "domain"
    • Give the Distinguished Name of the context entry as "dc=wso2,dc=com" and click finish.
Now you can see the created partition in the DIT structure shown in the LDAP Browser window as follows:
Now you can create your own directory structure there by creating "ou"s and store entries.
Have a great time...!! :)


  1. On 1.
    .Lets say the new partition name is dc=example,dc=com.

    Did you mean "dc=wso2,dc=com"?

  2. Yes, It should be "dc=wso2,dc=com". Thanks for pointing it out. Fixed..!

  3. "[PortalLDAPImporterImpl:196] Error importing LDAP users and groups
    when i run liferay this error populate and i can make connection ldap and liferay but cant access users .
    thank you.

  4. Hi,

    Can you please help me to resolve an issue on ldap authentication? the question is explained here,

    Thank you.

  5. Can we create partition using commands?? If yes please explain


Note: Only a member of this blog may post a comment.