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.

2728 questions
17
votes
3 answers

Listing group members using ldapsearch

Our corporate LDAP directory is housed on a Snow Leopard Server Open Directory setup. I'm trying to use the ldapsearch tool to export an .ldif file to import into another external LDAP server to authenticate with externally; basically trying to be…
colemanm
  • 659
  • 5
  • 10
  • 25
16
votes
7 answers

Use LDAP for MySQL authentication?

We run a couple dozen different MySQL servers for our users. These use the free/Open Source version of MySQL, not the commercial version. Managing the Account Passwords on these servers is painful. Are there any plugins which would allow us to use…
Stefan Lasiewski
  • 23,667
  • 41
  • 132
  • 186
16
votes
6 answers

Linux + Active directory authentication + only letting certain groups login

I have some linux boxes that use Windows Active Directory authentication, that works just fine (Samba + Winbind). What I would like to do now though is only allow certain people or certain groups to login using Active Directory credentials.…
Luma
  • 1,460
  • 4
  • 19
  • 31
15
votes
2 answers

ldap_add no such object (32) matched dn dc=domain dc=com

When im trying to import users to LDAP using this command: ldapadd -x -D "cn=Manager,dc=domain,dc=com" -W -f /etc/openldap/root.ldif I have this error: ldap_add no such object (32) matched dn dc=domain,dc=com Let me show you the…
PookPook
  • 261
  • 1
  • 2
  • 9
15
votes
7 answers

There's got to be a FOSS web-based LDAP password reset app out there, right?

It seems like every shop that uses LDAP at some point has to cobble together something to let users reset their passwords without bothering the IT staff. The workflow almost always looks like: User gives username (jblow) Email jblow@company a…
Bill Weiss
  • 10,979
  • 3
  • 38
  • 66
15
votes
4 answers

Linux Central Authentication/Authorization Methods

I have a small but growing network of Linux servers. Ideally I'd like a central place to control User Access, change passwords, etc... I've read a lot about LDAP servers, but I'm still confused about choosing the best authentication method. Is…
Chris McBride
  • 151
  • 1
  • 1
  • 3
15
votes
1 answer

Where does Active Directory-integrated DNS store its data?

This has been bugging me for a while. We all know Active Directory is a LDAP database. We also know that the Windows DNS service, when running on a domain controller, can store its data in AD instead of plain text zone files, thus taking advantage…
Massimo
  • 70,200
  • 57
  • 200
  • 323
15
votes
2 answers

Using LDAP as auth method for git repositories

I want to convince my boss that we should be using git for version control. He says, that it absolutely must authenticate users through our central LDAP server. I looked at the various solutions (gitweb, gitorious ... ) and couldn't really find a…
Leonard Ehrenfried
  • 371
  • 1
  • 3
  • 8
14
votes
3 answers

Which field to use when authenticating against Active Directory?

Active Directory user objects include a number of fields that can be considered an identifier. The following lists some of these with their label in ADUC and their attribute name: Full Name - cn ? - name User sAMAccountName logon -…
dunxd
  • 9,632
  • 22
  • 81
  • 118
14
votes
2 answers

"no global superior knowledge" while adding a country

I must add an organizationalunit like this into a freshly installed OpenLDAP (on Ubuntu 12.04) : dn: ou=MYREGION, ou=MYAPP, ou=GROUPS, o=myorganization, c=fr ou: MYREGION objectClass: top objectClass: organizationalunit So as it's a new LDAP, I…
Anthony O.
  • 674
  • 1
  • 5
  • 14
14
votes
3 answers

libpam-ldap or libpam-ldapd?

I'm setting up LDAP authentication on my personal VPS, and Ubuntu has two packages for the same purpose: libpam-ldap and libpam-ldapd. Which should I use?
jldugger
  • 14,342
  • 20
  • 77
  • 129
14
votes
3 answers

Restricting account logins using LDAP and PAM

I was hoping some PAM/LDAP gurus may be able to help me out here. I've recently set up an LDAP directory on Ubuntu Server to hold accounts for both my clients (for use with web-based systems) and staff (who will need to login via SSH.) The LDAP…
Andy Shellam
  • 1,878
  • 1
  • 12
  • 16
13
votes
1 answer

What does "DEL:" mean in the DistinguishedName of an AD Object?

Sorry -- I'm not really a Windows System Admin, just trying to slam through some LDAP interactions in Java. I'm finding a ton of objects with "DEL:" in the distinguishedName. Are these orphaned items that are awaiting garbage collection? How do I…
13
votes
2 answers

SSH only works after intentionally failed password

So, I'm having a rather weird problem. I have a server, that when I try to SSH into, immediately closes the connection if I type in the correct password on the first attempt. However, if I purposefully enter a wrong password on the first attempt,…
pyraz
  • 161
  • 1
  • 6
13
votes
3 answers

How do you trace/debug LDAP connections against Active Directory?

I am spoiled, and have been doing most of my LDAP work with eDirectory, which has a utility called DSTrace which is lovely, and for LDAP specifically, will show you all the bind attempts, the source IP's, the searches passed in, a summary of the…
geoffc
  • 2,165
  • 5
  • 25
  • 40