<br><font size=2 face="sans-serif">I have Iplanet 5.0, which is ldapv.3 compliant. Simple authentication is our bind method.</font>
<br>
<br><font size=2 face="sans-serif">I am running win2000 on my deskpoint and my ldap resides on unix.<br>
<br>
<br>
 </font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Michael Ströder &lt;michael@stroeder.com&gt;</b></font>
<p><font size=1 face="sans-serif">09/26/2002 08:39 AM</font>
<br><font size=1 face="sans-serif">Please respond to michael</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;Richard.Ferry@judiciary.state.nj.us</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;Python Developer List &lt;python-ldap-dev@lists.sourceforge.net&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: Search w/ win2000</font></table>
<br>
<br>
<br><font size=2 face="Courier New">Richard.Ferry@judiciary.state.nj.us wrote:<br>
 &gt;<br>
 &gt; I have version ldap-1.10a3 installed. I am running on a python 2.2 on<br>
 &gt; a win2000 system.<br>
<br>
Which LDAP server? Active Directory? Note that python-ldap 1.x cannot<br>
open an LDAPv3 connection. It's limited to LDAPv2 which is not allowed<br>
with Active Directory I suspect. There are other caveats of 1.x and LDAPv2.<br>
<br>
Unfortunately there's currently no Win32 build available of python-ldap <br>
2.x which is based on OpenLDAP 2.x libs.<br>
<br>
 &gt; I have been unable to make the search work. Below are some of my<br>
 &gt; unsuccessful tries. Can I use the &quot;_s&quot; option on the version<br>
<br>
The synchronous method search_s() is what you probably like to use. It<br>
returns the search result als list of 2-tuples containing the<br>
distinguished name (string) and the entry (dictionary).<br>
<br>
 &gt; Traceback (most recent call last):<br>
 &gt; &nbsp; File &quot;C:\Python22\test_ld1.py&quot;, line 3, in ?<br>
 &gt; &nbsp; &nbsp; l.simple_bind_s('uid=xxxxx,ou=myou,o=myorg','xxxxx')<br>
 &gt; LOCAL_ERROR: {'desc': 'Local error'}<br>
<br>
More information about your setup is needed. Which server? Is simple <br>
authentication enabled at the server at all?<br>
<br>
 &gt; l.simple_bind('uid=xxxxx,ou=myou,o=myorg','xxxxx')<br>
<br>
You should use the synchronous version for binding in any case.<br>
<br>
l.simple_bind_s('uid=xxxxx,ou=myou,o=myorg','xxxxx')<br>
<br>
 &gt; res = l.search('o=myorg', ldap.SCOPE_BASE,<br>
 &gt; 'uid=xxxxx,ou=myou,o=myorg',<br>
 &gt; [&quot;ou&quot;, &quot;l&quot;])<br>
 &gt;<br>
 &gt; for entry in res:<br>
 &nbsp;&gt; [..]<br>
 &gt; This code gives me this error msg: TypeError: iteration over<br>
 &gt; non-sequence<br>
<br>
search() in opposite to search_s() returns an integer representing the<br>
message ID of the started LDAP operation which is then used when calling<br>
result(). That's probably not what you want.<br>
<br>
Ciao, Michael.<br>
<br>
<br>
</font>
<br>
<br>