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
26
votes
4 answers

What is a good embeddable Java LDAP server?

I'm working on a Java web application that integrates with a few other external applications that are deployed along with it. Authentication information must be synchronized across everything and the other applications want to authenticate against…
aaronroyer
  • 419
  • 1
  • 5
  • 4
26
votes
2 answers

What are the accepted SECURITY_PRINCIPAL formats for LDAP Authentication against Active Directory?

I am trying to authenticate a user through LDAP against Active Directory. Following is the code snippet I use: private DirContext bindAsUser(String bindPrincipal, String password) { Hashtable env = new Hashtable(); …
Fung
  • 3,508
  • 2
  • 26
  • 33
25
votes
4 answers

Unable to enable PHP LDAP even though I have edited php.ini and php_ldap.dll is in the right place?

I've been working with a WAMP install for quite a while now with LDAP enabled and everything is going smoothly. Now though I have to set up another machine and for some reason I can't enable LDAP. I checked the output of phpinfo() and the LDAP…
Ciaran Phillips
  • 603
  • 1
  • 6
  • 9
25
votes
2 answers

Fatal error: Call to undefined function ldap_connect() in ubuntu

I'm trying to connect to my LDAP server via PHP, but I get the following error: Fatal error: Call to undefined function ldap_connect() Any help would be very appreciated. Thanks in advance, roshan
Roshan Wijesena
  • 3,106
  • 8
  • 38
  • 57
25
votes
1 answer

How do I delete one attribute in LDAP with LDIF?

How do I delete one attribute in LDAP with LDIF? I an trying to delete uniqueMember: cn=jsmith,ou=users,dc=s2rsolutions,dc=com can someone please show me the LDIF to do it? dn: cn=USER,ou=groups,dc=s2rsolutions,dc=com objectClass:…
SJS
  • 5,607
  • 19
  • 78
  • 105
25
votes
3 answers

Node JS LDAP Auth User

I am creating a login authentication page, where a user would input there active directory username and password and using NodeJS I would check to see if it's valid, but I keep getting [Error: LDAP Error Bad search filter] or [Error: Search…
Sukh
  • 361
  • 2
  • 5
  • 11
24
votes
6 answers

Working with DirectoryServices in ASP.NET Core

I am upgrading my ASP.NET Core RC1 application to RC2. I have some references to System.DirectoryServices and System.DirectoryServices.AccountManagement in some *.cs files so that I can query LDAP. But I have no idea how to add references to it in…
BinaryNexus
  • 875
  • 3
  • 15
  • 30
24
votes
10 answers

Using LDAP (AD) for MySQL authentication

I'm trying to come up with a plan to allow users to auth with a MySQL database (many, actually) using LDAP. More specifically, ActiveDirectory. Database will likely be accessed through applications, not web. What are my options? EDIT: Okay. It…
snicker
  • 6,080
  • 6
  • 43
  • 49
23
votes
2 answers

Can't Bind for successful connection

I am trying to test a connection to AD using OpenLDAP and this is what I try on the command line: /usr/bin/ldapsearch -h names.myorg.com \ -p 389 \ -D "cn=conapps readonly,cn=users,dc=myorg,dc=com" \ -LLL \ -x \ -b "ou=MyOrg…
user290043
23
votes
4 answers

How to check user password in ldap whith java with given LdapContext?

I do have a web-application, where users must log in. The password is stored in a LDAP server. All information about the LDAP server are stored in the application server (glassfish) as external jndi resource. So my application does no know anything…
raffael
  • 2,427
  • 4
  • 26
  • 42
23
votes
6 answers

How to use Go with LDAP protocol

How can I use Go to call and manage Ldap protocol directly? are there any packages? or must I use udp and tcp?
Mahdi Sardari
  • 277
  • 1
  • 2
  • 7
22
votes
3 answers

Difference between SQL and LDAP

I have used both SQL and LDAP, but in a recent conversation with one of my peers I came to realize that there may be more to it. And that it could be beneficial to consider LDAP over SQL at times. So my challenge/request/question: Can you explain to…
Tedd Hansen
  • 12,074
  • 14
  • 61
  • 97
22
votes
2 answers

ADAM, Active Directory, LDAP, ADFS, Identity

What is the difference/relation between ADAM, Active Directory, LDAP, ADFS, Windows Identity, cardspace and which server (Windows 2003, Windows 2008) uses what?
kayak
  • 1,805
  • 5
  • 18
  • 22
22
votes
2 answers

Unattended install of krb5-user on Ubuntu 16.04

So, when running: sudo apt-get install krb5-user You are asked to enter the AD/LDAP domain. The problem is that I want this to be able to be run as a startup script for my machines. Is there any way to either pass the domain in as a parameter or…
user6907792
22
votes
4 answers

Spring security switch to Ldap authentication and database authorities

I implemented database authentication for my web page and web service. It work well for both, now I have to add Ldap authentication. I have to authenticate through remote Ldap server (using username and password) and if the user exists I have to…
luca
  • 3,248
  • 10
  • 66
  • 145