Samba LDAP

nazard at dragoninc.on.ca nazard at dragoninc.on.ca
Fri Feb 11 18:54:20 GMT 2000


On 12 Feb, Martin Brown wrote:
> 
> Does anyone know who is heading the Samba with LDAP project?  I am using
> Samba-TNG frmo a few days ago, after a few of my own modifications to the
> code and Lukes help I have gotten it to compile successfully.  And I can
> even change passwords using smbpasswd in my LDAP database.  But I get the
> strangest error when I try to auth from NT against Samba as the PDC.  Samba
> should be referencing the LDAP server, but it's not.  Here is what I get in
> my log.smb

I'm not sure what modifications have been made but it looks like ldap
support has been removed from loadparm.c all together. Here are my
current changes to get ldap working here. Note this is not samldap but
the original ldap support.

Index: source/passdb/ldap.c
===================================================================
RCS file: /cvsroot/samba/source/passdb/ldap.c,v
retrieving revision 1.36
diff -u -w -u -r1.36 ldap.c
--- ldap.c	1999/03/25 13:54:30	1.36
+++ ldap.c	2000/02/11 18:50:28
@@ -272,11 +272,11 @@
 	*mods = NULL;
 	if(operation == LDAP_MOD_ADD) { /* immutable attributes */
 	      ldap_make_mod(mods, LDAP_MOD_ADD, "objectclass", "sambaAccount");
-
+/*
 	      ldap_make_mod(mods, LDAP_MOD_ADD, "uid", newpwd->unix_name);
 	      slprintf(temp, sizeof(temp)-1, "%d", newpwd->unix_uid);
 	      ldap_make_mod(mods, LDAP_MOD_ADD, "uidNumber", temp);
-
+*/
 	      ldap_make_mod(mods, LDAP_MOD_ADD, "ntuid", newpwd->nt_name);
 	      slprintf(temp, sizeof(temp)-1, "%x", newpwd->user_rid);
 	      ldap_make_mod(mods, LDAP_MOD_ADD, "rid", temp);
Index: source/param/loadparm.c
===================================================================
RCS file: /cvsroot/samba/source/param/loadparm.c,v
retrieving revision 1.190.2.11
diff -u -w -u -r1.190.2.11 loadparm.c
--- loadparm.c	2000/02/09 17:00:15	1.190.2.11
+++ loadparm.c	2000/02/11 18:50:30
@@ -787,7 +787,6 @@
   {"Ldap Options", P_SEP, P_SEPARATOR},
 
   {"ldap server",      P_STRING,  P_GLOBAL, &Globals.szLdapServer,      NULL,   NULL,  0},
-  {"ldap port",        P_INTEGER, P_GLOBAL, &Globals.ldap_port,         NULL,   NULL,  0},
   {"ldap suffix",      P_STRING,  P_GLOBAL, &Globals.szLdapSuffix,      NULL,   NULL,  0},
   {"ldap bind as",     P_STRING,  P_GLOBAL, &Globals.szLdapBindAs,      NULL,   NULL,  0},
   {"ldap passwd file", P_STRING,  P_GLOBAL, &Globals.szLdapPasswdFile,  NULL,   NULL,  0},
@@ -795,6 +794,7 @@
 
 #ifdef WITH_NT5LDAP
   {"ldap realm",       P_STRING,  P_GLOBAL, &Globals.szLdapRealm,       NULL,   NULL,  0},
+  {"ldap port",        P_INTEGER, P_GLOBAL, &Globals.ldap_port,         NULL,   NULL,  0},
   {"ldap protocol version", P_INTEGER, P_GLOBAL, &Globals.ldap_protocol_version, NULL,   NULL,  0},
   {"ldap url",         P_STRING,  P_GLOBAL, &Globals.szLdapUrl,         NULL,   NULL,  0},
   {"ldap users subcontext",      P_STRING,  P_GLOBAL, &Globals.szLdapComputersSubcontext,      NULL,   NULL,  0},




More information about the samba-ntdom mailing list