Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a user access to an OpenLDAP server (let's name it A). I would like to replicate it in my OpenLDAP server (B) but without any administrator access to A.

How could I do this ? And could I have a non-destructive (add/update-only) OpenLDAP replication ?

I actually do this with a big script.

share|improve this question
up vote 1 down vote accepted

Assuming you have no root/admin access to the source LDAP server, you could use LDAP searches for "replicating" the data. But please be aware of the fact that LDAP servers usually come with ACLs which means that you might not have access to all the data.

Furthermore, LDAP searches won't give you the "hidden" or system attributes, such as modificationDate, entryCSN etc.

Use the following command to have a look at the source LDAP server:

ldapsearch -x -LLL -h <IP of LDAP server> 

If this command doesn't work, you most probably do not have your ldap.conf configured with the credentials. If you have done that and there is still no output, use filters etc., such as:

ldapsearch -x -LLL cn=*


ldapsearch -x -LLL uid=*

If you are unsure what to look for, I highly recommend to connect to the LDAP server with one of the following tools:

  • shelldap
  • ldapvi
  • gq

These tools allow LDAP browsing and will give you an overview about the source LDAP structure.

When running a few LDAP searches and writing the output to a ldif, you can therefore "replicate" the data.

share|improve this answer
Thanks, this is a correct answer but I changed my mind, I will import filtered LDAP data to my database. – Dorian Apr 10 '12 at 4:46

There are many ways you can configure replication of LDAP servers. You can have A as the master and B as the slave, or use a master / master topology, which is useful for failover scenarios.

The OpenLDAP documentation explains in more detail.

share|improve this answer
To clarify : the LDAP is public, and I'm just an user, I have read access to it, and I would like to replicate it. Because in the OpenLDAP documentation, you should be an administrator of the OpenLDAP server. – Dorian Mar 21 '12 at 17:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.