Questions tagged [ldap]

Lightweight Directory Access Protocol (LDAP), is an application protocol for accessing and maintaining distributed directory information services over an IP network.

The Lightweight Directory Access Protocol is an application protocol for accessing distributed directory services that act in accordance with X.500 data and service models over an IP network. Access is via unsecured TCP/IP, TLS or SSL. LDAP is a binary protocol described in terms of ASN.1 and transmitted using ASN.1 Basic Encoding Rules (BER).

A directory is a hierarchical collection of records known as a Directory Information Base, or when visualized, as a Directory Information Tree. The directory model should be visualized as an upside-down tree, much like a UNIX file-system. The root of the Directory Information Tree is known as the prefix or namingContext. The namingContext, supported versions of the protocol, supported features and supported controls (operation semantics modifiers) and other information can be discovered by querying the root DSE, though the information might be protected by access controls.

Clients (Directory User Agents) issue requests to the directory server (Directory System Agent) and the directory server returns an appropriate response, which could be success (which might include requested entries from the Directory Information Tree in the case of a search), or an indication of success or failure of a search, add, modify, delete, moddn (rename) or extended operation. Controls might be used to alter the semantics of a request, for example, a sort control might be included with a search request to sort the returned entries (known as a server-side sort). Without the inclusion of the sort control in the search request, entries returned from search operations are not ordered, and must not be ordered. Clients must not expect that entries are ordered in any way.

Modern directory servers support a high-speed replication mechanism which is not defined by the standard, though there have been some attempts at defining a replication standard. Therefore, replication and the protocol used for replication is vendor-specific. If data must be synchronized between directory servers from different vendors, a synchronization device must be used.

Most modern programming languages have an LDAP SDK, including Java, PHP, Perl, C/C++, and others. Directory Server software usually comes equipped with a set of command line tools such as ldapsearch, ldapmodify, and others.

Directory Information Trees accessed by the LDAP protocol are used in authentication and authorization applications, configuration storage, profile storage, public-key infrastructure and other applications requiring:

  • speed of access
  • a small, light-weight protocol
  • A simple programming model
  • easily configured replication, redundancy, and failover

Questions that are specific to Active Directory should not be tagged with the LDAP tag unless the question is specifically related to the LDAP protocol or the Directory Information Model. Active Directory provides an LDAP interface, but that interface, while LDAP version 3 compatible, does not fully implement the LDAP standard, and deviates from it in important ways. Therefore, there are questions that can be answered that are specific to Active Directory that are not applicable to standards-compliant LDAP servers and vice versa. Correctly tagging a questions will result in a higher probability of an accurate, timely response.

11627 questions
634
votes
4 answers

What are CN, OU, DC in an LDAP search?

I have a search query in LDAP like this. What exactly does this query mean? ("CN=Dev-India,OU=Distribution Groups,DC=gp,DC=gl,DC=google,DC=com");
Ritesh Chandora
  • 8,382
  • 5
  • 21
  • 38
417
votes
11 answers

What are the differences between LDAP and Active Directory?

What are the differences between LDAP and Active Directory?
boingboing
348
votes
27 answers

I can't install python-ldap

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 How can I fix this?
VacuumTube
  • 4,021
  • 4
  • 22
  • 19
165
votes
17 answers

What is LDAP used for?

I know that LDAP is used to provide some information and to help facilitate authorization. But what are the other usages of LDAP?
gizmo
151
votes
4 answers

How to write LDAP query to test if user is member of a group?

I want to write an LDAP query which tests whether a user (sAMAccountName) is a member of a particular group. Is it possible to do that so that I get either 0 or 1 result records? I guess I can get all groups for the user and test each one for a…
paul
  • 13,312
  • 23
  • 81
  • 144
112
votes
6 answers

Authenticating in PHP using LDAP through Active Directory

I'm looking for a way to authenticate users through LDAP with PHP (with Active Directory being the provider). Ideally, it should be able to run on IIS 7 (adLDAP does it on Apache). Anyone had done anything similar, with success? Edit: I'd prefer a…
DV.
  • 4,585
  • 9
  • 37
  • 44
99
votes
11 answers

Authenticating against active directory using python + ldap

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…
1729
  • 4,961
  • 2
  • 28
  • 17
90
votes
15 answers

LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1

LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1 I know "52e" code is when username is valid, but password is invalid. I am using the same user name and password in my apache studio, I…
anusha vannela
  • 901
  • 1
  • 6
  • 6
87
votes
4 answers

Query to list all users of a certain group

How can I use a a search filter to display users of a specific group? I've tried the following: (& (objectCategory=user) (memberOf=MyCustomGroup) ) and this: (& (objectCategory=user) …
Madam Zu Zu
  • 6,437
  • 19
  • 83
  • 129
77
votes
6 answers

Easy way to test an LDAP User's Credentials

Is there an easy way to test the credentials of a user against an LDAP instance? I know how to write a Java program that would take the 'User DN' and password, and check it against the LDAP instance. However is there any easier way? Specially a…
user1888243
  • 2,591
  • 9
  • 32
  • 44
76
votes
9 answers

Authenticating against Active Directory with Java on Linux

I have a simple task of authenticating against Active Directory using Java. Just verifying credentials and nothing else. Let's say my domain is "fun.xyz.tld", OU path is unknown, and username/password is testu/testp. I know there's a few Java…
DV.
  • 4,585
  • 9
  • 37
  • 44
70
votes
3 answers

How to create and add users to a group in Jenkins for authentication?

I choose to use "Jenkins's own user database" security realm for user login as I couldn't use LDAP in my company. And Google's OpenID has issue when you decided to change the hostname or port number to something else. And I use "Project-based…
samxiao
  • 2,587
  • 5
  • 38
  • 59
67
votes
10 answers

Could someone please explain LDAP?

I often hear things like "Can we load our employee info using LDAP?" Yet, the title "Lightweight Directory Access Protocol" makes me think of it as a protocol rather than a physical database management system like Oracle or MSSQL. So could someone…
Cuga
  • 17,668
  • 31
  • 111
  • 166
66
votes
8 answers

How to save the LDAP SSL Certificate from OpenSSL

I wanted the SSL Certificate of my LDAP Server which is Novell eDirectory. I have used openssl to connect to ldap to view the certificate. openssl s_client -connect 192.168.1.225:636 It is just printing the certificate. How can I save this to some…
Dungeon Hunter
  • 19,827
  • 13
  • 59
  • 82
64
votes
11 answers

What does LDAP solve?

I've been in touch with LDAP in many projects I've been involved in but, the truth be told, I don't really understand it. I thought it was just a person directory but after I discovered that it can contain any objects in a hierarchical structure. I…
victor hugo
  • 35,514
  • 12
  • 68
  • 79
1
2 3
99 100