Django Ldap 身份验证超时
我在本地计算机上托管一个基于 django 的站点(我对其具有完全访问/控制权)。 该站点通过 django ldap 插件根据远程活动目录对用户进行身份验证。
过去可以对 LDAP 服务器进行身份验证!
现在,当尝试对 LDAP 服务器进行身份验证时,请求会挂起直至超时。我在日志中找不到任何有用的东西。
服务器设置是: NginX、Django 1.3、Fedora 15、mySql 5.1。
我不知道应该尝试查看哪些日志。
(我尝试查看 nginx access
和 error
日志,但没有用。)
我尝试过的事情:
在 django 上运行该网站并通过 localhost 访问它(不通过Nginx,但通过 runserver
命令直接访问 python manage.py
)。 这有效
从命令行运行ldapsearch
。 这有效
编辑: 我使用wireshark来查看与LDAP服务器的来回交互。交互似乎很好 - django 发送一个绑定请求并收到一条成功消息,然后发送一个搜索查询并返回一个用户对象。然而,在这次通信之后,django 似乎挂起了。当我在运行“authenticate(username=user,password=pass)”后在 django shell 中按“Ctrl-c”时,堆栈跟踪位于 django-ldap 库中的某个位置。
请帮忙,我不知道是什么变化导致了这个问题。
先感谢您
I am hosting a django-based site on a local machine (I have full access/control to it).
This site authenticates users against a remote active directory via the django ldap plugin.
authenticating against LDAP server used to work!
Now, when trying to authenticate against the LDAP server, the request just hangs until it times out. I couldn’t find anything useful in the logs.
The server setup is:
NginX, Django 1.3, Fedora 15, mySql 5.1.
I don’t know what logs I should try to look at.
(I've tried looking in nginx access
and error
logs but to no use.)
Things I tried:
Running the site on django's and accessing it via localhost (not going through Nginx, but accessing python manage.py
directly, via the runserver
command). this works
Running ldapsearch
from the command line. this works
edit:
i used wireshark to look at the back-and-forth with the ldap server. the interaction seems to be fine - django sends a request to bind and it receives a success msg, and then sends a search query and a user object is returned. however, after this communication django seems to hang. when i "Ctrl-c" in the django shell after running "authenticate(username=user, password=pass)", the stack trace is sitting somewhere in the django-ldap library.
Please help, I have no idea what changed that caused this problem.
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Active Directory 不允许匿名绑定进行授权;您可以匿名绑定,但不能做任何其他事情。
检查用于与 AD 绑定的用户是否具有有效的凭据(即帐户尚未过期)。如果有的话,你会得到这些奇怪的错误。
Active Directory does not allow anonymous binds for authorization; you can bind anonymously but you cannot do anything else.
Check if the user that is being used to bind with AD has valid credentials (ie, the account hasn't expired). If it has, you'll get these strange errors.