Any help would be great on this.  I've been trying to bind a
username and password to the ldap server for authentication, but when I
locally run this script:<br>
<br>
<span style="font-family: courier new,monospace;">#!/usr/bin/python</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import ldap</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">## Connect to LDAP host</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">try:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    ldapcn = ldap.initialize('<a href="ldap://xxx.xxx.xxx.xxx">ldap://xxx.xxx.xxx.xxx</a>')</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    ldapcn.bind('cn=username,o=domain','password',ldap.AUTH_SIMPLE)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    print "Successful."</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">except ldap.LDAPError, e:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    print e</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    print "Declined.\n"</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
I always get a successful return even if the password or username is
incorrect.  Or, if I even leave the username and password field in
the initialize function blank, I get a successful return.<br>
I need some guidance in the correct direction.<br>
<br>
Thanks!<br>
Derek<br clear="all"><br>-- <br>Perriero, Derek<br><a href="mailto:derek.perriero@gmail.com">derek.perriero@gmail.com</a><br>