ldap3

ldap3 python search members of a group and retrieve their sAMAcountName (NT Username)

ldap3 python search members of a group and retrieve their sAMAcountName (NT Username) Question: 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 I’m …

Total answers: 1

How to safely authenticate a user using LDAP?

How to safely authenticate a user using LDAP? Question: For context: I am developing a web application where users need to authenticate to view internal documents. I neither need any detailed info on users nor special permission management, two states are sufficient: Either a session belongs to an authenticated user (→ documents can be accessed) …

Total answers: 1

ldap3 extend.microsoft.modify_password keeps returning false

ldap3 extend.microsoft.modify_password keeps returning false Question: I’m trying to modify an user account password in but it doesn’t work, I’ve tried it directly in AD and it does work. I’m using ldap3 to do it, here’s the steps I do. First I do the app operation like this from ldap3 import Server, Connection, ALL s …

Total answers: 2

This script gives all the users data (eg. given output) but I want to fetch specific user's uid, uidnumber, mail, employeenumber. How do I do that?

This script gives all the users data (eg. given output) but I want to fetch specific user's uid, uidnumber, mail, employeenumber. How do I do that? Question: What I should I do to get users uid number, mail, employeenumber? from ldap3 import Server, Connection # clear connection my_server = ‘XXX’ my_user = ‘uid=idmsa,ou=People,ou=auth,o=csun’ my_password = …

Total answers: 2

LDAP Filter Syntax

LDAP Filter Syntax Question: I am using python library ldap3 to send requests to the servers to query user objects that are not disabled and have a display name or email that contains the user input: query = "(&(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(displayName={0}*)(mail={0}*))".format(value) I followed what I think the documentation says about forming LDAP filters, but I am getting …

Total answers: 2

Authenticate with Flask-LDAP3-Login based on group membership

Authenticate with Flask-LDAP3-Login based on group membership Question: I’m new to Flask and I’m trying out Flask-LDAP3-Login. I’ve followed the documentation here and i have it working which is great: https://flask-ldap3-login.readthedocs.io/en/latest/index.html How would i go about authenticating a user based on whether they are a member of a specific group? I see the docs mention …

Total answers: 3