[Samba] multiple alternative LDAP backends

Andrew Bartlett abartlet at samba.org
Fri Oct 11 08:55:01 GMT 2002


Massimiliano Mirra wrote:
> 
> I'm using Samba marked 2.999+3.0cvs20020723 from Debian `sid'.
> 
> In smb.conf, I've got:
> 
>    passdb backend = ldapsam:ldaps://master.ldap.server ldapsam:ldaps://backup.ldap.server tdbsam
> 
> All works fine when both ldap servers are up, or when at least the
> first is up.  When the first is down, though, samba tries to connect
> to it, doesn't manage to, and gives up instead of trying the next
> one(s).
> 
> This is the log output:
> 
> Oct 10 14:31:23 newton smbd[13549]: [2002/10/10 14:31:23, 0] passdb/pdb_ldap.c:ldapsam_connect_system(322)
> Oct 10 14:31:23 newton smbd[13549]:   Bind failed: Can't contact LDAP server
> Oct 10 14:31:23 newton smbd[13549]: [2002/10/10 14:31:23, 0] passdb/pdb_ldap.c:ldapsam_getsampwnam(1206)
> Oct 10 14:31:23 newton smbd[13549]:   ldapsam_getsampwnam: init_sam_from_ldap failed!
> 
> Is this by design?  Can samba still be forced to try next backends if
> the current one can't be accessed?

Hmm, while the current code wan't quite intended to work like that, I'll
need more details as to why this doesn't actually function.  Better
still, we should probably make ldapsam take more than one URL.  

Are you up to writing some patches?  This is probably best done while
adding 'cached connections' to LDAP - make the transparent rebind try
the slave if the master goes down.

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net



More information about the samba mailing list