ldap

Search deleted users/groups in AD with python-ldap

Search deleted users/groups in AD with python-ldap Question: If you delete an user or group in windows AD, it will in “DElETE objects”. I want to use python ldap lib to get them. Code: <code> import ldap uri = “ldap://10.64.74.17” user = “XXXXXXXXXX” password = “XXXXXXXXXXXX” ldap.set_option(ldap.OPT_REFERRALS, 0) ldap.set_option(ldap.OPT_NETWORK_TIMEOUT, 5) ldap.protocol_version = 3 ldapClient = …

Total answers: 1

Installing py-ldap on Mac OS X Mavericks (missing sasl.h)

Installing py-ldap on Mac OS X Mavericks (missing sasl.h) Question: I can’t seem to be able to get the python ldap module installed on my OS X Mavericks 10.9.1 machine. Kernel details: uname -a Darwin 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 I tried what was suggested here: http://projects.skurfer.com/posts/2011/python_ldap_lion/ …

Total answers: 6

LDAP query in python

LDAP query in python Question: I want to execute the following query in the ldap ldapsearch -h hostname -b dc=ernet,dc=in -x “(&(uid=w2lame)(objectClass=posixAccount))” gidnumber ldapsearch -h hostname -b dc=ernet,dc=in -x “(&(gidNumber=1234)(objectClass=posixGroup))” cn And use the variables thus obtained. How can I do that? Asked By: w2lame || Source Answers: you can use the commands module, and …

Total answers: 5

I can't install python-ldap

I can't install python-ldap Question: When I run the following command: sudo pip install python-ldap I get this error: In file included from Modules/LDAPObject.c:9: Modules/errors.h:8: fatal error: lber.h: No such file or directory Any ideas how to fix this? Asked By: VacuumTube || Source Answers: The python-ldap is based on OpenLDAP, so you need to …

Total answers: 25

LDAP connection problem with self-signed cert

LDAP connection problem with self-signed cert Question: The code I am using: # Create LDAPObject instance conn = ldap.initialize(url) conn.protocol_version=ldap.VERSION3 conn.simple_bind_s(binddn,bindpw) # This raises: # ldap.SERVER_DOWN: {‘info’: ‘error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed’, ‘desc’: “Can’t contact LDAP server”} When I use ldap:// instead of ldaps://, it works correctly. Can anybody help me figure out why this is? …

Total answers: 5

Using AD as authentication for Django

Using AD as authentication for Django Question: I’m working on a Django-based application in a corporate environment and would like to use the existing Active Directory system for authentication of users (so they don’t get yet another login/password combo). I would also like to continue to use Django’s user authorization / permission system to manage …

Total answers: 5

Authenticating against active directory using python + ldap

Authenticating against active directory using python + ldap Question: How do I authenticate against AD using Python + LDAP. I’m currently using the python-ldap library and all it is producing is tears. I can’t even bind to perform a simple query: import sys import ldap Server = “ldap://my-ldap-server” DN, Secret, un = sys.argv[1:4] Base = …

Total answers: 11