Re: ldap problem

Go to solution
Frequent Advisor

ldap problem

Hi all,
I've an openldap server (say ldap-master) that replicates the db to a slave server (say ldap-slave).
The replication works very well, every change i make on the master take effect also on the slave.

The problem is:
How can i set the ldap client so that if the master is down it makes the authentication queries to the slave??
I tried to put two lines in /etc/openldap/ldap.conf on the client

host IP_master
host IP_slave

but it doesn't work

Bryan Swanson_1
Occasional Advisor

Re: ldap problem

Just list multiple servers (space separated) on one line, like this:

host IP_master IP_slave


Gopi Sekar
Honored Contributor

Re: ldap problem

You should give the list of servers separated by space. if you are using newer version of ldap HOST is deprecated and URI is the replacement for it. i have attached description for both of them for your referrence.

Specifies the URI(s) of an LDAP server(s) to which the LDAP library should connect. The URI scheme may be either ldapor ldaps which refer to LDAP over TCP and LDAP over SSL (TLS) respectively. each server's name can be specified as a domain-style name or an IP address literal. Optionally, the server's name can followed by a ':' and the port number the LDAP server is listening on. If no port number is provided, the default port for the scheme is used (389 for ldap://, 636 for ldaps://). A space separated list of URIs may be provided.

Used to specify the name(s) of an LDAP server(s) to which ldap library should connect to. Each serverâ s name can be specified as a domain-style name or an IP address and optionally followed a â :â and the port number the ldap server is listening on. A space separated listed of host may be provided.

Never Never Never Giveup
Sid Shorter_2

Re: ldap problem

One other method is to use your DNS server and just set the two ldap boxes to a common name like ldap_server and then list both IP addresses

You would end up with three DNS entries 145.x.x.x 145.x.2.x ldap1 ldap2