python-flask_simpledap赢得';束缚

python-flask_simpledap赢得';束缚,python,ldap,Python,Ldap,我正在使用并且正在努力获得一个绑定连接来做任何有用的事情 我的LDAP服务器是active directory 精简后的代码如下所示,看起来几乎相同: 运行flask应用程序时,我会遇到如下错误: LDAPException: Operations error 在尝试进行故障排除时,我修改了flask\u simpledap\uuuu init\uuuu.py文件,以显示错误的信息以及描述;现在我得到了有关错误的更多信息: LDAPException: 000004DC: LdapErr: D

我正在使用并且正在努力获得一个绑定连接来做任何有用的事情

我的LDAP服务器是active directory

精简后的代码如下所示,看起来几乎相同:

运行flask应用程序时,我会遇到如下错误:

LDAPException: Operations error
在尝试进行故障排除时,我修改了
flask\u simpledap
\uuuu init\uuuu.py
文件,以显示错误的
信息以及
描述;现在我得到了有关错误的更多信息:

LDAPException: 000004DC: LdapErr: DSID-0C090752, 
comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580
所以,我想我需要理解的是为什么我的初始绑定无法工作。。。我的
app.config
中是否有错误

不确定问题出在哪里
ldapsearch
似乎在shell中工作:

ldapsearch -x -LLL -E pr=200/noprompt -h my-ldap-host.example.com -D "binduser@example.com" -w 'binduser_pw' -b "dc=example, dc=com" -s sub  "(sAMAccountName=binduser)"    | grep distinguishedName


distinguishedName: CN=Bind User,OU=Some_OU,DC=example,DC=com
其他详细信息

  • 我试过python2.7和3.5,同样的问题
  • Centos 7.2
  • Active Directory是我的LDAP服务器

谢谢你的帮助

不确定这是否有帮助,但我刚刚设置了
flask\u simpledap
以使用我们的测试Active directory实例。唯一相关的区别是我必须使用:

app.config['LDAP_USE_SSL'] = True

我想当我的DN或用户名格式无效时,我也看到了“操作错误”。

您的用户名必须是完全限定的

app.config['LDAP_USERNAME'] = 'uid=binduser,dc=example,dc=com'

好吧,这让我被束缚住,克服了我的第一个错误。谢谢你抽出时间。
app.config['LDAP_USERNAME'] = 'uid=binduser,dc=example,dc=com'