Questions tagged [ldap-query]

A type of transaction performed against an LDAP database

This is a type of transaction that is performed against an Lightweight Directory Access Protocol (LDAP) database. Usually in the form of a Select, Insert, Update, or Delete.

644 questions
8
votes
1 answer

How to query LDAP group membership with curl?

I would like to use curl on the command line to check if a $USER is a member of the LDAP group $GROUP. This works: curl --user $CREDS \ "ldaps://ldap.foo.com/DC=ads,DC=foo,DC=com??sub?(sAMAccountName=$USER)" \ | grep -a "memberOf:…
Lars Schneider
  • 5,530
  • 4
  • 33
  • 58
7
votes
3 answers

Why does Spring LDAP's LdapTemplate not return title, department & company attributes?

I'm using spring-ldap-core-2.3.1.RELEASE.jar over JDK 1.8 & Tomcat 8.0 to access AD information through LdapTemplate. The attributes such as title,department & company are not being returned by the ldapTemplate.search(..,.,..) method. I'm using the…
Shiva
  • 599
  • 1
  • 6
  • 21
7
votes
2 answers

How should I escape ldap special characters?

I'm using python-ldap to query Active Directory I have this DN CN=Whalen\, Sean,OU=Users,OU=Users and Groups,DC=example,DC=net That works fine as a base in a query, but if I try to use it in a search filter like…
Sean W.
  • 4,944
  • 8
  • 40
  • 66
7
votes
2 answers

Query AD Group Membership Recursively Through SQL

Background I'm creating some SQL to assist with security auditing; this will take security info from various systems databases and from Active Directory and will produce a list of all anomalies (i.e. cases where accounts are closed in one system but…
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
7
votes
1 answer

Bad search filter on LDAP when trying to get user data

I am fresh out of the box here with LDAP, so let me know if I am doing this in the completely wrong fashion. I am working with Symfony 1.4 using the bhLDAPAuthPlugin plugin I am verifying user login with LDAP. However, there is more data in the…
Carey Estes
  • 1,534
  • 2
  • 31
  • 59
6
votes
1 answer

Querying Active Directory with "SQL"?

I just wonder if anyone knows or made a wrapper around Active Directory to be able to easily query it in .net? Kind of like "LINQ-to-ActiveDirectory" or some SQL Dialect, i.e. to be able to do "SELECT DISTINCT(DEPARTMENT) FROM…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
6
votes
5 answers

how to get groups of a user in ldap

i am using openldap with phpldapadmin, and i'm trying to check what are the groups of a certain user. this is my scheme ... this is what i tried, but it didn't work docker-compose exec openldap ldapsearch -x -H "ldap://openldap" -D…
Mohamed Benkedadra
  • 1,964
  • 3
  • 21
  • 48
6
votes
3 answers

Paginate on LDAP server which does not support PagedResultsControl

I'm trying to get all entries on an LDAP server using Spring LDAP (version 2.3.2). Within my code, I make use of PagedResultsDirContextProcessor to paginate through all the result. This works fine on the servers which support PagedResultsControl.…
Raunak
  • 6,427
  • 9
  • 40
  • 52
6
votes
3 answers

LDAPSEARCH into table format

Is there any way to perform a LDAP search and save the results into a table format (e.g. csv)? Cheers Jorge
jorgehumberto
  • 1,047
  • 5
  • 15
  • 33
6
votes
3 answers

LDAP group membership (including Domain Users)

How can I get a list of users within an LDAP group, even if that group happens to be the primary group for some users? For example, suppose "Domain Users" is "Domain Leute" in German. I want all members of "CN=Domain Leute,DC=mycompany,DC=com". …
DougN
  • 4,407
  • 11
  • 56
  • 81
6
votes
1 answer

Can't import LDAP query feed data

I've set up an LDAP query that successfully pulls all data from the field physicaldeliveryofficename from our Windows Active Directory: I also setup a View that uses the query to further refine the list, so I am confident that the query itself is…
Sean Cunningham
  • 3,006
  • 5
  • 24
  • 35
6
votes
2 answers

LDAP Query that exclude computers

I had never done any DAP/AD admin or querying. Right now I have a task where I need to get all the USERS in our company's AD; but keep getting computers in the query's result. I use objectClass=user and still get all the computers in the AD. What…
Luis Garcia
  • 1,311
  • 6
  • 19
  • 37
6
votes
5 answers

How do I retrieve a list of only those users and groups that have been added since a certain date from an LDAP directory?

My application does an LDAP query once a day and fetches all the users and groups in a given container. Once it is fetched, my app goes iterates through the list of users of groups, adding only the new ones to my application's database (it adds only…
user157571
6
votes
2 answers

ldap_search will not accept filter with parentheses in the search input

In a php page I'm working on, an LDAP connection is established from which a list of cn entries are pulled and put into a dropdown. The selection from the dropdown is sent via form submission to another php scrips which checks the selected cn…
PeaBucket
  • 142
  • 1
  • 1
  • 9
5
votes
1 answer

Can I match a user to a group accross different domains?

I'm trying to write an LDAP query which will discover if a user is a member of a group which matches a wildcard query and I'm trying to use the LDAP_MATCHING_RULE_IN_CHAIN OID to do this. I'm basically following example 2 on this…
Benj
  • 31,668
  • 17
  • 78
  • 127
1
2
3
42 43