samba 3.0.6/7 ldap backend bug

Steve Holstead sholstea at ualberta.ca
Tue Sep 21 17:16:07 GMT 2004


Maybe another ldap backend bug


OPENBSD 3.4
SAMBA 3.0.6

I am trying to get my SAMBA server to talk to an external LDAP server via 
the ldapsam backend. I am also going by the assumption that one would 
accomplish this by specifying "ldap server =" in the smb.conf file. 
However I am some what unsure because the smb.conf man pages state that 
I must configure --with-ldapsam to get "ldap server=" to work.

What I have tried thus far is ....

If I configure SAMBA without --with-ldapsam and do a testparm, sure enough 
I get tis error message:
 		s3000# ./testparm
 		Load smb config files from /usr/local/samba/lib/smb.conf
 		Unknown parameter encountered: "ldap server"
 		Ignoring unknown parameter "ldap server"

Looked in loadparm.c and found
 		#ifdef WITH_LDAP_SAMCONFIG
 		FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer)
 		FN_GLOBAL_INTEGER(lp_ldap_port, &Globals.ldap_port)
 		#endif

Okay re-configure with --with-ldapsam and error goes away. Not really 
understanding the complete purpose of --with-ldapsam as specified in the 
WHATSNEW text I continued on. I start up my smbd and try to connect from 
my windows client to my samba server and get the following showing up in 
my log file:

[2004/09/21 10:23:31, 10] lib/smbldap.c:smbldap_open_connection(542)
   smbldap_open_connection: ldap://localhost
[2004/09/21 10:23:31, 2] lib/smbldap.c:smbldap_open_connection(638)
   smbldap_open_connection: connection opened
[2004/09/21 10:23:31, 10] lib/smbldap.c:smbldap_connect_system(769)
   ldap_connect_system: Binding to ldap server ldap://localhost as 
"cn=Manager,dc=stevesads,dc=ualberta,dc=ca"
[2004/09/21 10:23:31, 2] lib/smbldap.c:smbldap_connect_system(796)
   failed to bind to server with dn= 
cn=Manager,dc=stevesads,dc=ualberta,dc=ca Error: Can't contact LDAP server
         (unknown)
[2004/09/21 10:23:31, 1] lib/smbldap.c:another_ldap_try(936)
   Connection to LDAP server failed for the 1 try!


MY question now is what do I have to do to get a "server name" loaded up 
into "location" found in smbldap.c line 1161

         if (location) {
                 (*smbldap_state)->uri = talloc_strdup(mem_ctx, location);
         } else {
                 (*smbldap_state)->uri = "ldap://localhost";
         }

I do know that if I hard code it in it works....




More information about the samba-technical mailing list