简体   繁体   English

Django Ldap身份验证超时

[英]Django Ldap authentication timed out

I am hosting a django-based site on a local machine (I have full access/control to it). 我在本地计算机上托管了一个基于django的站点(我对此具有完全访问权限/控制权)。 This site authenticates users against a remote active directory via the django ldap plugin. 该站点通过django ldap插件针对远程活动目录对用户进行身份验证。

authenticating against LDAP server used to work! 通过LDAP服务器进行身份验证可以正常工作!

Now, when trying to authenticate against the LDAP server, the request just hangs until it times out. 现在,当尝试对LDAP服务器进行身份验证时,请求将一直挂起直到超时。 I couldn't find anything useful in the logs. 我在日志中找不到任何有用的信息。

The server setup is: NginX, Django 1.3, Fedora 15, mySql 5.1. 服务器设置为: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.) (我尝试查找nginx accesserror日志,但没有用。)

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). 在Django上运行网站并通过localhost访问它(不通过Nginx,而是通过runserver命令直接访问python manage.py )。 this works 这有效

Running ldapsearch from the command line. 从命令行运行ldapsearch this works 这有效

edit: i used wireshark to look at the back-and-forth with the ldap server. 编辑:我用Wireshark与ldap服务器来回查看。 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. 交互似乎很好-django发送绑定请求,并接收成功消息,然后发送搜索查询并返回用户对象。 however, after this communication django seems to hang. 但是,在此通信之后,django似乎挂起了。 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. 当我在运行“ authenticate(username = user,password = pass)”后在django shell中“ Ctrl-c”时,堆栈跟踪位于django-ldap库中的某个位置。

Please help, I have no idea what changed that caused this problem. 请帮助,我不知道是什么引起了此问题。

Thank you in advance 先感谢您

Active Directory does not allow anonymous binds for authorization; Active Directory不允许匿名绑定进行授权。 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). 检查用于与AD绑定的用户是否具有有效的凭据(即帐户尚未过期)。 If it has, you'll get these strange errors. 如果有的话,您会得到这些奇怪的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM