October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

What Is LDAP? Directories, Entries, RDNs, and DNs Explained

LDAP is the protocol for accessing directory services. Learn how directory trees, entries, attributes, RDNs, and DNs fit together.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

LDAP (Lightweight Directory Access Protocol) is a protocol that lets clients access directory services. LDAP is not the directory’s data: it is the way a client communicates with a directory. Inside that directory, information is arranged in a tree of entries; each entry has attributes, and its place in the tree is described by a distinguished name (DN).

What is LDAP?

LDAP stands for Lightweight Directory Access Protocol. It defines how clients communicate with directory services and the meaning and encoding of protocol elements. The protocol is specified in RFC 4511.

As an Amazon Associate I earn from qualifying purchases.

The key distinction is between the access protocol and the information service: LDAP is the protocol; the directory stores and organizes information. A client uses LDAP to access that service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How does a directory organize information?

A directory organizes its information in a Directory Information Tree (DIT). The tree is made up of entries connected by parent-child relationships. The directory model is described in RFC 4512.

#1 Best Overall
Sale
Mastering Active Directory: Design, deploy, and protect Active Directory Domain Services for Windows Server 2022
  • Mastering Active Directory: Design, deploy, and protect Active Directory Domain Services for Windows Server 2022, 3rd Edition
  • ABIS BOOK
  • Packt Publishing

Entries contain attributes

An entry is a named collection of information and the basic unit held in a directory. RFC 4512 puts it this way: “A directory entry, a named collection of information, is the basic unit of information held in the Directory.” An entry contains attributes, and each attribute has an attribute description and one or more values.

Schema defines what entries can contain

A directory’s schema constrains which object classes and attribute types an entry may use, as well as the values those attributes may hold. In other words, an entry is not simply an unrestricted bundle of text: its permitted structure and content depend on the directory’s schema.

What is the difference between an RDN and a DN?

An RDN (Relative Distinguished Name) names an entry relative to its immediate parent. A DN (Distinguished Name) combines that entry’s RDN with the DNs of its parent entries, giving a name that identifies the entry’s place in the tree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

RDN: a name among siblings

An RDN consists of one or more attribute-value assertions (AVAs). It must be unique among the children of the same parent, but it need not be unique across the entire directory. An RDN can also be multi-valued, with more than one AVA contributing to the name.

DN: the entry and its path

Consider CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US. Its leftmost component, CN=John Smith, is the RDN for the entry. The following components identify successive parent entries in the tree. This is a structural illustration, not a required directory layout; directories do not all use these containers.

The relationship can be read from left to right as entry first, then parent, then the next parent up the tree. That is why an RDN is relative while a DN identifies an entry in its directory context.

How is a DN written?

In LDAP’s DN string form, commas separate RDNs and an equals sign separates an attribute type from its value. In a multi-valued RDN, plus signs join the AVAs. These rules are defined in RFC 4514.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DN values cannot always be copied as plain, unescaped text. RFC 4514 specifies escaping for certain characters and positions, including a space or # at the beginning of a value, a space at its end, and punctuation such as commas, plus signs, quotation marks, backslashes, angle brackets, semicolons, and equals signs. A comma inside an escaped value, for example, is not a separator between RDNs. Treat a DN as structured syntax rather than an arbitrary comma-separated label.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Does the DN string determine whether two names are equal?

No. RFC 4514 does not define a canonical string representation for DNs. Two strings that look different are not necessarily different names, and byte-for-byte comparison alone is not the rule for deciding DN equality. The applicable matching rule is distinguishedNameMatch. Applications that need to compare DNs should use the directory’s defined matching behavior rather than rely only on the printed spelling.

Can a DN reveal personal or organizational information?

It can. DNs may contain descriptive details such as people’s names, email addresses, locations, or organizational information. RFC 4514 warns that this information can be sensitive. Treat DNs shown in logs, screenshots, or examples as potentially identifying data, and avoid sharing them casually.

LDAP’s directory model and DN syntax do not, by themselves, prescribe a deployment’s authentication or transport-security configuration. Those topics are addressed separately in RFC 4513 and RFC 4511.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.