ldap problem

 
SOLVED
Go to solution
Marco_113
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

Suggestions
Thanks
3 REPLIES 3
Bryan Swanson_1
Occasional Advisor
Solution

Re: ldap problem

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

host IP_master IP_slave

regards,
-b



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.

URI
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.

HOST
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.

Rega
Never Never Never Giveup
Sid Shorter_2
Advisor

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

ldap1.company.com 145.x.x.x
ldap2.company.com 145.x.2.x

ldap.company.com ldap1 ldap2