什么是LDAP响应的元组(97,[])是什么意思?LDAP

2023-09-08 12:53:59 作者:半世的流离

我使用的python-LDAP,试图验证对现有的Active Directory,当我用下面的code:

I am using python-ldap to try to authenticate against an existing Active Directory, and when I use the following code:

import ldap
l = ldap.initialize('LDAP://example.com')
m = l.simple_bind_s(username@example.com,password)

我得到以下回:

I get the following back:

print m
(97, [])

什么是97和空列表意味着从Microsoft Active Directory服务器来了?

What does the 97 and empty list signify coming from a Microsoft Active Directory server?

我推测,这是一个成功的认证,因为它没有错误(它不会,如果你使用了错误的密码或不存在的用户名),但我想知道如果元组是指一些有用的东西。

I gather this is a successful authentication since it doesn't error (which it does if you use the wrong password or non-existent username), but I'd like to know if the tuple means something useful.

推荐答案

按照文档 ,这就是:

LDAP_REFERRAL_LIMIT_EXCEEDED      0x61   The referral limit was exceeded.

也许

ldap.set_option(ldap.OPT_REFERRALS, 0)

可能会有帮助。

could help.

 
精彩推荐
图片推荐