Questions tagged [ldap]

Lightweight Directory Access Protocol (LDAP) for reading and editing directories over an IP network

The Lightweight Directory Access Protocol is an application protocol for reading and editing directories that follow the Directory Information Model over an IP network using 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 protocol or the Directory Information Model. Active Directory provides an LDAP interface, but that interface does not fully implement the LDAP standard, and deviates from it in important ways. Therefore, there are questions that can be answered 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.

2750 questions
39
votes
2 answers

In LDAP, what exactly IS a bind DN?

I've written various pieces of code that connect to LDAP servers and run queries, but it's always been voodoo to me. One thing I don't really understand is the concept of a bind DN. Here's an example using the ldapsearch command-line tool available…
dirtside
  • 1,621
26
votes
4 answers

Easiest way to set up LDAP for dev testing

I'm a developer for a product that integrates with LDAP for authentication. I need to set up a directory that I can test against. I'm not an expert with LDAP. To help ease the learning curve it'd be useful to have a real-world example directory. Are…
chroder
  • 674
17
votes
3 answers

Paging using ldapsearch

I am searching an LDAP directory that has a much larger number of results than the sizelimit currently set,500, by slapd.conf that for all intents and purposes cannot be changed) My idea was to keep running ldapsearch but from a different offset…
11
votes
4 answers

Can I get an explanation of the syntax of LDAP search base suffixes?

I know an LDAP search base suffix generally matches the directory server's host name. In other words, I know if the host name is od.foobar.com, I should use the search base suffix: dc=od,dc=foorbar,dc=com It bothers me to not understand why I'm…
username
  • 4,785
  • 19
  • 58
  • 79
10
votes
5 answers

What is LDAP?

How would you explain LDAP to a sysadmin who's heard of it and maybe interacted with it, but never really grasped it? Analogies are fine, but please include some salient technical details to help ground them. Asked in the spirit of Active Directory…
sh-beta
  • 6,858
9
votes
1 answer

What is the difference between an RDN, a DN, and a CN in LDAP?

I'm reading two (link1, link2) articles on LDAP and they make mention of Relative Distinguished Name (RDN), Distinguished Name (DN) and CN which is supposed to be the same thing as an RDN. I understand an RDN to be a key in a key-values pair for a…
leeand00
  • 4,919
9
votes
1 answer

ldapsearch: Invalid credentials (49)

I am trying to authenticate against our institutional LDAP server with the command ldapsearch. My user info in LDAP is shown in the following image: I used this command below to search by my DN: ldapsearch -x -H ldap://ldap.mdanderson.edu:389 -D…
Nasreddin
  • 193
8
votes
1 answer

GroupOfNames without members

I am building a new LDAP structure. I'd like to separate the LDIF-scripts for the creation of my structure from the scripts for the creation of my users. The structure will have to be applied on multiple servers (DTAP) but the users will only be…
6
votes
1 answer

ldap query for blank attribute value?

How does one query an ldap attribute for a blank value? The equivalent of str1==null in programming? I tried the following but it didn't…
leeand00
  • 4,919
6
votes
1 answer

Create a new objectClass in order to add a custom attribute to an existing objectClass

Long titles ask for short answers :) I have a ldap server with the default schemas. Under some organizational unit I have entries that have the structural objectClass person and another two clasess uidObject and top. I need to add an attribute to…
Tsouica
  • 75
5
votes
4 answers

LDAP distinguished name validator

Is there a library, program or simple regex to check if a DN specified in input is well formed? Example: INPUT: manager, ou=company, dc=net ---> OUTPUT: not well formed INPUT: cn=manager, ou=company, dc=net ---> OUTPUT: well formed
andPat
  • 151
5
votes
2 answers

Authenticating Nested Groups in LDAP

I don't know much about LDAP so I apologise in advance. I am looking at a bug in an application that does some authentication using LDAP. The LDAP directory structure set up by the client contains nested groups and looks like the following: UAT…
Tim
  • 51
5
votes
5 answers

phpldapadmin installation

I have an LDAP server runs on: ldap://129.168.0.117:389 or ldap://roshd.org:389 where roshd.org = 129.168.0.117 I have this configuration in config.php in phpldapadmin: $servers = new…
3
votes
1 answer

Search an LDAP tree with a wildcard for a node level?

Given an LDAP tree (AD in my case), is there a way of searching with a wildcard at a specific level in the tree? i.e. I'm wondering if there's an equivalent way of searching LDAP in the same way that you might do an ls /opt/*/lib in linux.
Dan
  • 620
3
votes
1 answer

Designing LDAP directory layout for an ISP-like organization

I administer a few servers for a small organization that offers ISP-like services to its members (webhosting, mail adressess on mutiple domains and associated IMAP accounts, Jabber accounts) and I want to centralize all account data in LDAP. I'm new…
1
2 3 4 5 6 7 8