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
60
votes
3 answers

ldap nested group membership

Is it possible to create an LDAP query which will return (or check for) users in a nested group? e.g. UserA is a member of GroupA, and GroupA is a member of GroupB. I want a query on GroupB to return that UserA is a member. LDAP only. The server is…
askvictor
  • 3,621
  • 4
  • 32
  • 45
59
votes
4 answers

Is there any free ldap server with data?

I need to test an application which uses LDAP for authentication, but still I don't have access to the server I have to use, but I need to test my application. Does somebody know if is there any LDAP server with data that i can use for access??
user981136
  • 617
  • 1
  • 5
  • 4
59
votes
1 answer

AD vs ADFS vs LDAP: Explain it like I'm 5

I don't work with Microsoft but I'm struggling understanding conceptually how AD, ADFS and LDAP work together. Let's say I have an application that needs an Identity Provider. How does AD and LDAP come into play? My googling hasn't come up with a…
brezotom
  • 715
  • 1
  • 8
  • 12
55
votes
2 answers

Querying Windows Active Directory server using ldapsearch from command line

Can anyone let me know if querying Active Directory server using ldapsearch, ldapadd, ldapdelete, etc. utilities is possible or not?
Shriram
  • 4,343
  • 8
  • 37
  • 64
53
votes
3 answers

ASP.NET Core 2.0 LDAP Active Directory Authentication

I have found a lot of information from the past saying that LDAP authentication isn't enabled yet but you can get around that using third party packages. However, it seems that LDAP authentication WAS implemented back in January. I can't seem to…
Window
  • 1,377
  • 2
  • 13
  • 23
52
votes
4 answers

Adding and removing users from Active Directory groups in .NET

I am writing the following methods to add and remove users from active directory in C#. void AddUserToGroup(string userId, string groupName); void RemoveUserFromGroup(string userId, string groupName); How best to implement these methods? Here is…
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
52
votes
3 answers

How to resolve javax.naming.PartialResultException?

We are seeing this warning messages in our logs javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=global,dc=com' It appears whenever users log-in to our application. As per this SO post, it can be…
Karthik Bose
  • 33,556
  • 3
  • 33
  • 43
49
votes
11 answers

How to get all the AD groups for a particular user?

I checked this post already. But it doesn't answer my question. I want to get all the active directory groups in which a particular user is a member. I've written the following code. But I'm not able to proceed further as I don't know how to give…
NLV
  • 21,141
  • 40
  • 118
  • 183
45
votes
6 answers

LDAP through Ruby or Rails

I've been attempting to hook a Rails application up to ActiveDirectory. I'll be synchronizing data about users between AD and a database, currently MySQL (but may turn into SQL Server or PostgreSQL). I've checked out activedirectory-ruby, and it…
Clinton
  • 2,296
  • 4
  • 19
  • 21
42
votes
1 answer

Why doesn't ldapsearch over ssl/tls work?

I am trying to use ldapsearch over a SSL/TLS connection, but it doesn't work: ldapsearch -ZZ -d 5 -b "cn=Users,dc=my,dc=server,dc=com" -s sub -D "cn=mydevice,cn=Users,dc=my,dc=server,dc=com" -h my.server.com -p 3269 -w "mypass" -x…
Qiang Xu
  • 4,353
  • 8
  • 36
  • 45
42
votes
6 answers

How do I clone an OpenLDAP database

I know this is more like a serverfault question than a stackoverflow question, but since serverfault isn't up yet, here I go: I'm supposed to move an application from one redhat server to another, and without very good knowledge of the internal…
elzapp
  • 1,961
  • 4
  • 15
  • 22
41
votes
6 answers

How to build LDAP integration for my web app?

My company develops and sells a SaaS application that has hundreds of customers. Some of our customers have asked us to support LDAP integration for authenticating user accounts against their existing systems instead of having to create another…
chief_wampum
  • 539
  • 1
  • 6
  • 11
40
votes
4 answers

LDAP Authentication using Java

I need to do LDAP Authentication for an application. I tried the following program: import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.ldap.InitialLdapContext; import…
anujin
  • 773
  • 7
  • 24
  • 36
39
votes
7 answers

When to use LDAP over a database?

When should I use LDAP vs. database/key-value-store/column-oriented-database/etc?
DavidHH
  • 391
  • 1
  • 3
  • 4
39
votes
2 answers

Understanding Django-LDAP authentication

I am new to Django and have been assigned the task of implementing a user authentication system with LDAP as the backend. I guess the documentation assumes that the end developer has enough experience in Django to be able to understand and implement…
name_masked
  • 9,544
  • 41
  • 118
  • 172