samba 3.0.6/7 ldap backend bug
Gémes Géza
geza at kzsdabas.sulinet.hu
Tue Sep 21 18:50:08 GMT 2004
Steve Holstead írta:
>
> 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....
>
>
>
In Samba 3.* ldapsam is a built-in sam backend, you don't have to pass
any arguments to configure for it.
If you configure --with-ldapsam, then you enable the so called
ldapsam-compat sam backend, which is the ldap backend (with the same
schema) of samba 2.2.* .
If you want to use the new (3.* specific) ldapsam, then you need to specify
passdb = ldapsam:ldap[s]://yourserver:yourserverport,
and no ldap server = yourserver
Regards,
Geza Gemes
More information about the samba-technical
mailing list