Questions tagged [ldap3]
164 questions
2
votes
2 answers
ldap3.core.exceptions.LDAPSessionTerminatedByServerError: session terminated by server
I am trying to run the code which is trying to build a connection:
server = Server(host='localhost', port=33389, use_ssl=False, get_info=ALL)
conn = Connection(server, user='uid=admin,ou=people,dc=example,dc=org', password=user-pass,…

user5431918
- 107
- 1
- 6
2
votes
1 answer
How to force user to change password at next logon with ldap3 python module?
I'm using ldap3 to create a user account in Active Directory (Win 2012R2) with python script. The only one attribute I can't set is "User must change password at next logon". Could you suggest a way to get this checkbox marked right after using…

Anton Belov
- 83
- 1
- 12
2
votes
1 answer
ldap3 bind cannot convert 'NoValue' object to bytes
Running python3.6
ldap3-python library
Using OpenLDAP on a docker container osixia/docker-openldap
Port 389 and 636 are open. I can see the connection in the console from python; however, i am getting issues.
Running python on jupyter notebooks on…

Kyle Cribbs
- 51
- 6
2
votes
0 answers
unwillingToPerform ldap3 useAccountControl change
I am using ldap3 module in python to create and disable users in AD in python. When I create a user using the following code,
from ldap3 import *
import ssl
tls_configuration = Tls(validate=ssl.CERT_REQUIRED,…

asd
- 21
- 3
2
votes
1 answer
Understanding the process sequence in Django's middleware
I'm quite new to Django, and have been assigned the task of building a web application that authenticates a user against LDAP, once authneticated the user can search for a person/group in the LDAP Server. In the last few weeks I've been stuggling…

pymat
- 1,090
- 1
- 23
- 45
2
votes
0 answers
LDAP3 Reader cursor high memory usage compared to basic search
I'm learning ldap3 for Python (as well as learning Python...)
I'm trying to pull some records using ldap3, iterate through them and perform some work on them before putting the results into another database, simple stuff.
The problem I'm having is…

dangel
- 7,238
- 7
- 48
- 74
2
votes
2 answers
How to use ldap3 generator for pagination?
I want to paginate the results of an ldap query so that I get 50 users per query for each page. The documentation here http://ldap3.readthedocs.io/searches.html?highlight=generator suggests that using a generator is the simplest way to do this,…

Stefan
- 51
- 1
- 4
2
votes
1 answer
python ldap3 bulk delete users and groups
Is there any way to delete from AD pack of objects with python ldap3?
Something like
conn.delete("(CN='auto*'),CN=Users,DC=mycompany,DC=com")
doesn't find any
TIA!

user3406201
- 21
- 2
1
vote
0 answers
Python LDAP3 subdomains search
I have two domains - example.com and corp.example.com in a single forest. I want to retrieve users' information such as sAMAccountname, distinguishedName, displayName and department from both domains.
This domains are trusted to each other,…

Arius
- 11
- 2
1
vote
0 answers
Why is my password change failing when using ldap3 to modify passwords in Active Directory with Python 3.x?
How do I change Password of a user of Active Directory using python ldap3
I am trying to create a python script what will open LDAP connection to a server running Active Directory, takes username as input and gives details like cn, email of the…

Rohan
- 11
- 2
1
vote
1 answer
LDAP Signing with LDAP3 module in python
I am using LDAP3 module to query information from Active Directory. To get information like GMSA password blob(ManagedPassword attribute), Active Directory expects that either connection is secure(LDAPS) or LDAP signing(Integrity) is used. I ran…

Sitaram Pamarthi
- 445
- 3
- 5
- 14
1
vote
1 answer
Check if current user is in a specific group if so execute some code else quit
I am pretty new to python and active directory.
I used a little bit of ldap3 to search the AD for the members of the group.
Can I somehow check if the current user is in a specific AD group and if that is the case some more code executes?
Is there…

TimeLost
- 11
- 4
1
vote
0 answers
Unable to set “User cannot change password“ ACE with python ldap3
I am trying to create a service account via the Ldap3 library in Python. The service account is successfully created, but there is a small problem. The "User cannot change password" checkboxes is not selected.
I did some research and found that to…

user2273231
- 31
- 5
1
vote
0 answers
Py3 ldap3 Module not returning SAMAccountName attribute
I am trying to put together a self service portal so users can unlock their accounts in Active Directory, currently running into an issue where ldap3 is not exposing the samaccountname attribute, it returns several attribs, just not the sam. This…

200mg
- 503
- 1
- 10
- 24
1
vote
1 answer
How to authenticate a user with a hashed password using python3 ldap3?
So I'm trying to authenticate a user who has a password on the LDAP server in the {algorithm}hash format. I try to log the user in like this:
with Connection(server, "", "plaintext-password") as conn:
conn.bind()
…

NekoLuka
- 21
- 4