On Fri, 2003-08-08 at 02:46, Matt Bednarik wrote: > I installed samba 3.0.0 beta3 on FreeBSD 5.0 alpha RELEASE, with > ./configure --with-ldapsam --with-quotas --prefix=/usr/local/ldapsamba, > the smbd log told me this: > > 2003/08/07 07:37:29, 0] lib/module.c:smb_load_module(40) > Error loading module '/usr/local/ldapsamba/lib/pdb/ldapsam.so': Cannot > open "/usr/local/ldapsamba/lib/pdb/ldapsam.so" > [2003/08/07 07:37:29, 0] passdb/pdb_interface.c:make_pdb_methods_name(447) > No builtin nor plugin backend for ldapsam found > [2003/08/07 07:37:29, 1] passdb/pdb_interface.c:make_pdb_context_list(537) > Loading ldapsam:ldap://127.0.0.1 failed! > I did a updatedb and then did a locate ldapsam.so and it found nothing. > That file does not exist in that directory either.
I was having problem with this also but I found a work-around, the problem is when you run the configure script it tests to see if it can compile a test program against the LDAP libraries but if it can't, it won't tell you. When you run configure check for a place where it says it's testing for LDAP support and check the few lines after it, chances are it'll say it can't find ldap or something like that. If you want to test your LDAP libraries yourself make a small c file like this (I'm not a programmer at all so I'm not even sure if I'm using the function correctly or if there's mistake in the program but it compiled on my computer, that's the important part, I'm sure a programmer would find mistakes in this 10 lines of code): --- #include <stdio.h> #include <ldap.h> int main() { ldap_init("127.0.0.1" 389); return 0; } --- Compile it using "gcc -lldap -o file file.c" If you can't compile it then Samba won't be able to compile itself with LDAP support. So now you have two options, modify the Samba compile scripts or the OpenLDAP compile scripts. I choose the later since it'll solve problems when linking other programs against the OpenLDAP library (and I tried to modify the Samba compile scripts but had no luck with that). I've attached the patch I used to compile OpenLDAP so it would link against the other libraries it needs so you can compile the test program (and Samba) against the LDAP libraries. It's based on a Redhat patch since when I tried to compiled Samba on Redhat it worked but the Redhat patch didn't work out of the box when I tried to use it to compile OpenLDAP on Slackware. Also I'm not sure that's the right way to do it but it works for me! Let me know if it works. Jean-Rene Cormier
-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba