From: jean-marc p. <jea...@ac...> - 2003-09-30 11:41:40
|
Helo , After read mails from archives, I sucessfully install python-ldap on redhat 9. (install tgz of openldap-2.1.22 Modify source with python-ldap_libs.patch ( -libs = ldap_r lber sasl2 ssl crypto +libs = ldap_r ldap lber sasl2 ssl crypto ) before that I have an error messages on import undefined symbol: ldap_first_reference) Now I have a segmentation fault on simple bind >>> import ldap >>> l = ldap.open('ip_address') >>> l.simple_bind_s('','') Erreur de segmentation I install the package on an xp system and it works perfectly. I try to install the package on a debian and I have python setup.py build Traceback (most recent call last): File "setup.py", line 10, in ? from distutils.core import setup, Extension ImportError: No module named distutils.core Any help would be greatly appreciated, especially on RedHat. Jean-Marc Pouchoulon |
From: <bjo...@it...> - 2003-09-30 11:54:17
|
jean-marc pouchoulon: > Helo , > After read mails from archives, I sucessfully install > python-ldap on redhat 9. (install tgz of openldap-2.1.22 > Modify source with python-ldap_libs.patch ( -libs =3D ldap_r lber sasl= 2 > ssl crypto > +libs =3D ldap_r ldap lber sasl2 ssl crypto ) before that I have an err= or > messages on import undefined=20 > symbol: ldap_first_reference) > Now I have a segmentation fault on simple bind > >>> import ldap > >>> l =3D ldap.open('ip_address') > >>> l.simple_bind_s('','') > Erreur de segmentation >=20 > I install the package on an xp system and it works perfectly. >=20 > I try to install the package on a debian and I have=20 >=20 > python setup.py build > Traceback (most recent call last): > File "setup.py", line 10, in ? > from distutils.core import setup, Extension > ImportError: No module named distutils.core >=20 >=20 > Any help would be greatly appreciated, especially on RedHat.=20 For ldap: install apt for redhat and use e.g. the following in your /etc/apt/sources.list : rpm http://apt.freshrpms.net redhat/9.0/en/i386 os updates freshrpms rpm ftp://apt-rpm.tuxfamily.org/apt redhat/9.0/en/i386 os updates extra (just sed'ed s/"7.3"/"9.0"/g, so I don't know if the url is correct.) then, for both redhat and debian, run the following commands: $ apt-get update && apt-get upgrade $ apt-get install python-ldap that's it. --=20 Regards Bj=F8rn Ove Gr=F8tan |
From: Jens V. <je...@zo...> - 2003-09-30 11:58:11
|
> After read mails from archives, I sucessfully install > python-ldap on redhat 9. (install tgz of openldap-2.1.22 > Modify source with python-ldap_libs.patch ( -libs = ldap_r lber sasl2 > ssl crypto > +libs = ldap_r ldap lber sasl2 ssl crypto ) before that I have an error > messages on import undefined > symbol: ldap_first_reference) A guy here at work replaced "ldap_r" with "ldap" in the LIBS line and it worked. He traced it to a broken Makefile in OpenLDAP itself (even in the latest RPMs) that did not mention all the right things (don't have the details here). > Now I have a segmentation fault on simple bind >>>> import ldap >>>> l = ldap.open('ip_address') >>>> l.simple_bind_s('','') > Erreur de segmentation ldap.open is deprecated. Read the docs and use ldap.initialize instead. Michael has produced wonderful python-style documentation, see python-ldap.sourceforge.net. > I try to install the package on a debian and I have > > python setup.py build > Traceback (most recent call last): > File "setup.py", line 10, in ? > from distutils.core import setup, Extension > ImportError: No module named distutils.core I don't do Debian. I bet Debian's python package might be split up in all kinds of pieces and you need to install more of them. They're weird that way. jens |
From: Mauro C. <mci...@si...> - 2003-10-01 08:38:46
|
Jens Vagelpohl wrote: > ldap.open is deprecated. Read the docs and use ldap.initialize instead.= May I say that I don't really care for ldap.initialize()? I must have=20 missed something, but I really can't understand why the older style=20 should be deprecated. What's the real win over using ldap.open()? :-\ To put it in other words, I can't get myself to appreciate LDAP URLs,=20 which I find quite cumbersome & complicated. I can never remember=20 whether the "sub" argument goes before or after the attribute list, and=20 the inability to specify arguments by name (=E0 la Python) is to me a big= =20 loss. Besides, I am instanciating an LDAP object, so it should be quite=20 clear I need an object which talks LDAP, without having to write it=20 again in a function argument :-) IMHO, the LDAP URL only interesting usage is in a browser URL line (in=20 fact I strongly suspect is *was* invented for exactly that reason by=20 Netscape). Anyway, there must be some reason, since ldap.open is being deprecated:=20 anyone caring to tell me why? Thanks in advance, Mauro |
From: <mi...@st...> - 2003-10-01 09:27:28
|
Mauro Cicognini wrote: > Jens Vagelpohl wrote: > >> ldap.open is deprecated. Read the docs and use ldap.initialize instead. > > May I say that I don't really care for ldap.initialize()? I must have > missed something, but I really can't understand why the older style > should be deprecated. What's the real win over using ldap.open()? :-\ ldaps:// and ldapi:// Ciao, Michael. |
From: Mauro C. <mci...@si...> - 2003-10-01 09:48:35
|
Michael Str=F6der wrote: > Mauro Cicognini wrote: > >> Jens Vagelpohl wrote: >> >>> ldap.open is deprecated. Read the docs and use ldap.initialize instea= d. >> >> >> May I say that I don't really care for ldap.initialize()? I must have = >> missed something, but I really can't understand why the older style=20 >> should be deprecated. What's the real win over using ldap.open()? :-\ > > ldaps:// and ldapi:// You mean there's no way to open a secure LDAP connection other than=20 using initialize()? Duh... Anyway, thanks for the explanation. BTW, what's "ldapi://"? Mauro |
From: <mi...@st...> - 2003-10-01 10:23:51
|
Mauro Cicognini wrote: > Michael Str=F6der wrote: >=20 >> Mauro Cicognini wrote: >> >>> May I say that I don't really care for ldap.initialize()? I must have= =20 >>> missed something, but I really can't understand why the older style=20 >>> should be deprecated. What's the real win over using ldap.open()? :-\= >> >> ldaps:// and ldapi:// >=20 > You mean there's no way to open a secure LDAP connection other than=20 > using initialize()? To use LDAP over SSL on a separate server port you need ldap.initialize()= =2E Using StartTLS extended operation is a different story. Anyway use ldap.initialize() when developing apps to be more flexible in = the long run. > Anyway, thanks for the explanation. >=20 > BTW, what's "ldapi://"? LDAP over Unix domain socket, no TCP (supported by OpenLDAP). Ciao, Michael. |
From: jean-marc p. <jea...@ac...> - 2003-10-06 11:04:19
|
Thanks for yours previous answers, it works on debian,xp without any problem but on redhat 9 no. What I can see using strace is connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("X.X.X.X")}, 28) = 0 send(4, "]\242\1\0\0\1\0\0\0\0\0\0\00212\00261\003168\003192\7i"..., 44, 0) = 44 gettimeofday({1065437510, 248252}, NULL) = 0 poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(4, FIONREAD, [436]) = 0 recvfrom(4, "]\242\205\200\0\1\0\1\0\t\0\t\00212\00261\003168\00319"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53 ), sin_addr=inet_addr("X.X.X.X")}, [16]) = 436 close(4) = 0 brk(0) = 0x81d1000 brk(0x81d5000) = 0x81d5000 brk(0) = 0x81d5000 brk(0x81d6000) = 0x81d6000 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Any ideas ? Thanks . |