None

Adding a domain to Apache LDAP

December 24, 2009

By default, it seems really hard to add domain names to the directory server from the Apache Directory Studio, with lots of hard to understand errors. This is because you need to change a server configuration file to add the new domain.

Default example.com

The server is, by default, set up to support example.com. To add this, right click Root DSE, and do a New Context Entry. Create an entry from scratch, and select domain. Click next. Enter dc=example,dc=com in the box provided, next and finish. This will create a new node under Root DSE.

Different Domains

To add a different domain, you need to change the server config, located in server.xml. This file, for me, was in /var/lib/apacheds-1.5.5/default/conf.

In here, you'll find the jdbmPartition tag which relates to dc=example,dc=com. To add a new one, add a new jdbmPartition node as a peer of the existing one:

<jdbmPartition id="drumcoder" suffix="dc=drumcoder,dc=co,dc=uk"/>

Next, restart the server

/etc/init.d/apacheds-1.5.5-default restart

Check the log file at /var/lib/apacheds-1.5.5/default/log/apacheds-rolling.log for errors if things aren't restarting properly (there doesn't seem to be an error on the console if the start failed).

You will now be able to follow the instructions above to create a new context node for drumcoder.co.uk, using dc=drumcoder,dc=co,dc=uk.