[Tutor] LDAP search with ldap library module failing

Antonio de la Fuente tonifuente at yahoo.co.uk
Mon Aug 5 13:57:20 CEST 2013


* Dominik George <nik at naturalnet.de> [2013-08-05 12:45:42 +0200]:

> Date: Mon, 5 Aug 2013 12:45:42 +0200
> From: Dominik George <nik at naturalnet.de>
> To: Antonio de la Fuente <tonifuente at yahoo.co.uk>, tutor at python.org
> Subject: Re: [Tutor] LDAP search with ldap library module failing
> User-Agent: Mutt/1.5.21 (2010-09-15)
> Message-ID: <20130805104541.GE11510 at keks.naturalnet.de>
> 
> Hi,
> 
> > Now, if I search fog cn=ab*, a much limited search it will return the search
> > results. Thinking that it could be a limitation from the server side, I've done
> > the same search with ldapsearch in bash, and it gets what is expected.
> 
> Are you sure it gets what is expected? ldapsearch limits the results to
> 500 - maybe the LDAP library does not. How many entries do you expect?
> 

It doesn't look that ldapsearch is limiting the results to 500 hundred.

Around the 40000ish entries... And that is what ldapsearch returns,
48522 entries.

> > I am using ipython, and python 2.6 in a linux OS.
> 
> Why are you using such an outdated version? Any chance you upgrade to
> Python 2.7?
> 

I am going to run the script in a CentOS 6.4 box, and that is its python
version.

> > My question is: How can I try to debug this issue?
> 
> There are several ways, Two are reading the LDAP server logs, and
> tcpdumping the connection to see if anything happens. I am pretty
> certain that this is not an issue with your code.
> 

I'll try that.

> > The error message is: ('EOF in multi-line statement', (379, 0))
> 
> > --> 519     return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout)
> 
> This is why I say "never use ipython". The error message is complete
> non-sense.
> 

I will also try with IDLE.

> -nik
>

Thank you nik.

> -- 
> * concerning Mozilla code leaking assertion failures to tty without D-BUS *
> <mirabilos> That means, D-BUS is a tool that makes software look better
>             than it actually is.
> 
> PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17  FD26 B79A 3C16 A0C4 F296


More information about the Tutor mailing list