Questions tagged [python-ldap]

python-ldap provides an object-oriented API to access LDAP directory servers from Python programs

python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It wraps the OpenLDAP 2.x library.

Additionally the package contains several LDAP-related utilities for processing:

  • LDIF,
  • LDAPURLs,
  • LDAPv3 schema.

Reference:

243 questions
0
votes
1 answer

Kallithea setting up ldap support can't find admin->ldap section on ubuntu

Hello I'm trying to setting up ldap support for kallithea. I followed the instructions here: https://pythonhosted.org/Kallithea/setup.html In the Setting up LDAP support section it says: LDAP settings are located in admin->ldap section I couldn't…
Kingalione
  • 4,237
  • 6
  • 49
  • 84
0
votes
0 answers

pip cant install python-ldap into virtualenv

I just wanted to rename my virtualenv so i did pip freeze > requirements.txt in old one and then pip install -r req.txt and all went well exept for python-ldap. Here is error given by pip: (Btw I created virtual environment using…
waTEXmelon
  • 215
  • 1
  • 3
  • 11
0
votes
1 answer

Pulling elements from dict embedded in a list in Python 3

TL:DR version: Trying to pull a list out of a dict (Edited out: tuple) based on it's index. i.e. {'a': [1,2], 'b':[3,4]} ... trying to figure out how to return the list associated with a or b respectively. Answered: MyDict = {'a': [1,2],…
oBreak
  • 105
  • 5
0
votes
0 answers

How to combine logical operators with search filters in python LDAP?

I am a newbie at python and I am working on a personal project of mine. The project includes grabbing data through LDAP, which returns JSON data. Sample of data: cn=abcd [[('uid=abcd,OU=active,OU=employees,OU=people,O=xxxx.com', {'status':…
surya
  • 253
  • 3
  • 9
0
votes
1 answer

How to remove an objectClass from an entry using python-ldap?

I am using Python-LDAP module to interact with my LDAP server. How can I remove an objectClass from an entry using python-ldap? When I generated a modlist with modlist.modifyModlist({'objectClass':'inetLocalMailRecipient},{'objectClass' : ''}) , it…
Guruprasad
  • 1,447
  • 4
  • 16
  • 34
0
votes
1 answer

python - ldap -how can I use ldap module by not importing python ldap module

Where can I get source code for python ldap module . I want to integrate with my python code to use ldap module (but donot want to install separtely or import) -shijo
shijo
  • 9
  • 3
0
votes
0 answers

Sorting a file through content

I am performing writes to a file using python while data is grabbed recursively. Since there is no order in which the data is being retrieved , a different order of data is achieved everytime a write happens and that is producing problems. Is it…
surya
  • 253
  • 3
  • 9
0
votes
0 answers

Why is the length of the list displayed as zero in my code?

import ldap try: l = ldap.initialize("ldap://ldap.xxxxx.com:389") username=raw_input("Enter the username : ") password = raw_input("Enter the password :") if(username == "" or password==""): print "Login Error : Username or…
surya
  • 253
  • 3
  • 9
0
votes
2 answers

Python-LDAP Size limit exceeded

I see there is a way for me page the results in python and I found the following example code: https://bitbucket.org/jaraco/python-ldap/src/f208b6338a28/Demo/paged_search_ext_s.py When I copy this code and try to modify it to what I need it to do…
screwuphead
  • 71
  • 11
0
votes
1 answer

ldap search with special character('+') returns null

I want to search a particular ldap-node within groups by unique-member attribute. Something like. search_filter = 'uniqueMember=mail='testuser.+abc@abc.com',ou=people,dc=myorg,dc=com' When I search this filer with conn.search_s(node_dn,…
rajalokan
  • 481
  • 4
  • 5
0
votes
2 answers

python-ldap and Microsoft Active Directory: connect and delete user

python-ldap newb here. I am trying to do this with the following sample code: import ldap ## first you must bind so we're doing a simple bind first try: l = ldap.open("valid ip") l.set_option(ldap.OPT_REFERRALS, 0) l.protocol_version =…
user1684462
0
votes
2 answers

How to list all groups members of a ldap group?

I have Plone 3 with LDAP, I have a lot of groups and users in it. I would like to get all groups members for a specific group. groupe_id = "mygroup" gtool = getToolByName(self, 'portal_groups') group = gtool.getGroupById(groupe_id) members =…
Jihaisse
  • 977
  • 5
  • 24
0
votes
3 answers

Extracting DN(distinguished name) in ldap

I am writing a piece of code that uses authentication from ldap server. Currently my code only lets the user DN and the pwd to be presented for login. Username: CN=mynane,CN=Users,DC=example,DC=com Pwd : XXXX Now what is want to do is allow the…
ashokadhikari
  • 1,182
  • 3
  • 15
  • 29
0
votes
1 answer

how to specify ldap server address when binding to the ldap server?

I am trying ldap authentication. My ldap server is located at x.x.x.x . I am using python-ldap. Connection on server locally doing: ldap.initialize('ldap://localhost:389') works fine, but when i try to connect to the server from another machine,…
ashokadhikari
  • 1,182
  • 3
  • 15
  • 29
-1
votes
1 answer

ldap search_filter escape specific charter

I retrieve members of a group and their sAMAccountName (NT Accounts) I run the following code takes from: ldap3 python search members of a group and retrieve their sAMAcountName (Active Directory) I'm getting user name as output but after few…
shlco
  • 1
  • 2
1 2 3
16
17