问题标签 [python-ldap]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Python-ldap set_option 不适用于优胜美地
我们已经成功安装了 python-ldap(2.4.19) 模块并成功执行了大部分操作。但是,当我们尝试加载证书以使用 ssl (ldaps) 时,ldap.set_option 总是返回异常。
它发生在运行 Yosemite 的笔记本上,但不在 Mavericks 或 Linux 上。(所有 Macbook 都安装了 xcode)
我们认为它应该是一些丢失/过时/更新的库,但我们不知道如何找到它。
有什么线索吗?
python - 由于许多安装错误,无法在 RHEL 6.5 上使用 pip2.7 安装 python-ldap
我在 RHEL 6.5 服务器上安装 python-ldap。我在 Python 2.7.9 上。
我正在使用以下命令进行安装
编译过程失败并出现很多错误。
有人可以指导我吗?
flask - pip 无法将 python-ldap 安装到 virtualenv 中
我只是想重命名我的 virtualenv,所以我在旧的中做了 pip
freeze > requirements.txt
,然后pip install -r req.txt
一切顺利,除了 python-ldap。这是 pip 给出的错误:(顺便说一句,我使用 virtualenvwrapper 创建了虚拟环境。)
gcc -v
返回这个:
django - Django Auth LDAP - NO_SUCH_OBJECT
今天出乎意料的是,我的 WEBApp 开始登录失败。我正在针对 LDAP 对用户进行身份验证。Web 应用程序托管在带有 Django 1.6.1 和 Apache 2.2 以及 mod_wsgi 的 Windows 2003 Server 上。
错误是
错误:18/02/2015 01:52:17 PM:结果(3)引发 NO_SUCH_OBJECT({'info':“0000208D:NameErr:DSID-031001CD,问题 2001(NO_OBJECT),数据 0,最佳匹配:\n \t'OU=EU,DC=osud,DC=corp'\n", 'matched': 'OU=EU,DC=cosud,DC=corp', 'desc': '没有这样的对象'},)
我检查了http://docs.oracle.com/cd/E19957-01/816-5618-10/netscape/ldap/LDAPException.html#NO_SUCH_OBJECT它说
在http://www.python-ldap.org/doc/html/ldap.html它说这个
但这些都不适用于这种情况。大约 2 小时后,登录再次开始工作。期间重启了 Apache 服务器,但不确定这是否会导致此问题。
我还能做些什么来解决这个问题?可以添加更多日志以获取更多信息吗?
ubuntu - Kallithea 设置 ldap 支持在 ubuntu 上找不到 admin->ldap 部分
您好,我正在尝试为 kallithea 设置 ldap 支持。我按照这里的说明进行操作: https ://pythonhosted.org/Kallithea/setup.html
在设置 LDAP 支持部分它说:LDAP 设置位于 admin->ldap 部分
我找不到 admin->ldap (文件?)来配置 ldap 设置。
我在哪里可以找到它?
python - UWSGI 是否会影响来自底层 Django 应用程序的 LDAPS 请求?
我已将此类作为 django 中的身份验证后端插入
整个事情在Apache + uWSGI下运行。当我独立运行 Django(manage.py runserver)时,LDAP 和 LDAPS 一切正常。
但是当使用 LDAPS 在 uWSGI 下运行它时,它总是抛出“Server Down”。LDAP(不带's')有效。使用 tcpdump 我可以看到数据包在 AD 和我的服务器之间双向传输。
uWSGI 如何影响 python-ldap 或底层库与 Active Directory 之间的 LDAPS 通信?
python - Python-Ldap 库。导入 LDIF
是否可以像这样导入 LDIF
使用 python-ldap 库(http://www.python-ldap.org/)?
是的,我可以通过这种方式向 LDAP 添加新记录http://www.grotan.com/ldap/python-ldap-samples.html#add但我不确定这样的文本 ldif 文件。
PS。完整答案在这里http://pastebin.com/eQU7xBfj
python - HOW-TO: LDAP bind+authenticate using python-ldap
Could you please advise on how to troubleshoot the attempt below; am trying to bind to a ldap server, but in vain, when I do
It succeeds :
That is from system-side, but when I try to do a bind via python-ldap module :
python - Use Python script to manage remote LDAP server
Background: I am working on an API to centralize user creation and management for multiple resources(e.g. Google Apps, Dropbox, etc...). On a Linux VM, I developed an API and web interface that allows me(and my co-admins) to authenticate and manage user accounts for these services. The next thing I need to integrate is our Active Directory which is hosted on a remote Windows Server 2008.
I have been trying to use python-ldap to connect to and retrieve/modify information but have had issues with DIR_ERROR operations errors(when trying to query for users) and NAMING_VIOLATION errors(when trying to add users).
*Code based on http://www.grotan.com/ldap/python-ldap-samples.html, stackoverflow questions, and python-ldap documentation Binding code that I believe works:
which prints: (97, [], 1, [])
Query for users script: (tried without bind as suggested by article, but received "In order to perform this operation a successful bind must be completed on the connection.")
which results in the following: (97, [], 1, []) {'info': '000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0\n','desc':'Operations error'}
Add user script:(using ldaps)
Which results in: ldap.SERVER_DOWN: {'info': 'A TLS packet with unexpected length was received.','desc': "Can't contact LDAP server"}
*This made me think that the port might be the problem, so I changed the initialize line to l = ldap.initialize("ldap://serverIp:389/")
similar to the other two scripts.
Now I get: ldap.NAMING_VIOLATION: {'info': "00002099: NameErr: DSID-0305109C, problem 2005 (NAMING_VIOLATION), data 0, best match of:\n\t'dc=adtest, dc=local'\n", 'desc': 'Naming violation'}
Additionally, I have messed around with adding the ou and uid to the attrs but no change in error.
What am I doing wrong or what could I try to do differently? Thank you for any help/suggestions!
edit: I checked my server, and port 636 is correctly set to allow Secure LDAP traffic, so I don't know why that was giving me different errors than the normal LDAP. edit2: I tried changing the following line in my add script dn="cn=test,dc=adtest.local"
and the new output(stack trace) I have is(I added the print statement in to show that the bind is actually taking place now before the error):
(97, [], 1, [])
Traceback (most recent call last):
File "test2.py", line 21, in <module>
l.add_s(dn,ldif)
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 202, in add_s
return self.result(msgid,all=1,timeout=self.timeout)
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 465, in result
resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 469, in result2
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 476, in result3
resp_ctrl_classes=resp_ctrl_classes
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 483, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
File "/usr/local/lib/python2.7/dist-packages/ldap/ldapobject.py", line 106, in _ldap_call
result = func(*args,**kwargs)
ldap.REFERRAL: {'info': 'Referral:\nldap://adtest.local/cn=test,dc=adtest.local', 'desc': 'Referral'}