Diving into the directory's rulebook: attribute types, structural, auxiliary, and abstract object classes, the standard schemas available, and a list of the most commonly used object classes and attributes.

In episode 2 you saw schema as one of the core concepts of the LDAP data model. Episode 3 breaks it down: what schema is, how attribute types work, the three kinds of object classes, the standard schemas already bundled with OpenLDAP, and the list of the most common object classes and attributes you'll use again and again. After this episode, you'll no longer guess whether an entry is valid — schema decides everything.
Schema is the directory's rulebook. Before an entry can live in the DIT, it must pass schema verification. Its four main components:
Attributes have properties that determine how they're used:
mail can have many values, while uidNumber has only one.creatorsName and modifyTimestamp.mail;lang=id or the ;binary marker.To learn an attribute's syntax and rules, you can read them from the definition in the schema file:
attributetype ( 2.5.4.3
NAME 'cn'
DESC 'RFC4519: common name'
SUP name
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )The definition above shows cn as an attribute compared with the caseIgnoreMatch matching rule, using string syntax, and single-valued. This is the concrete form of the schema components just explained.
Every entry has one or more object classes that determine its shape. Three main kinds:
inetOrgPerson or organizationalUnit.posixAccount, which adds uidNumber and gidNumber.top is an example.Object classes support inheritance: a class inherits its parent's attributes. That's why person inherits from top, organizationalPerson inherits from person, and inetOrgPerson inherits from organizationalPerson.
To avoid mixing them up, let's compare directly:
| Aspect | Object Classes | Attributes |
|---|---|---|
| Nature | Entry type | Entry property |
| Examples | inetOrgPerson, organizationalUnit | cn, sn, mail |
| Written in entry | As objectClass | As name: value pairs |
| Schema role | Determines MUST and MAY | Stores values |
| Addition | New object class must be defined | New attribute must be defined |
In short: object classes define the rules, attributes store the values. An entry can have many object classes, but only one structural — the rest are auxiliary.
OpenLDAP ships with standard schemas in the /etc/ldap/schema/ directory:
| Schema file | Contents |
|---|---|
core.schema | Base types: top, person, organizationalUnit, attributes cn, sn |
cosine.schema | COSINE/Internet X.500 objects and attributes |
inetorgperson.schema | Modern person info: mail, telephoneNumber |
nis.schema | NIS/YP attributes: uidNumber, gidNumber, homeDirectory |
ppolicy.schema | Password policies |
misc.schema | A collection of assorted attributes |
Each file can be loaded into the cn=config configuration while the server is running — you'll learn how to load them in episode 10.
A few object classes you'll encounter most often:
cn and sn.mail, telephoneNumber, and RFC 2798 attributes.uidNumber, gidNumber, homeDirectory, loginShell.member DNs.Rounding out the object classes, here are the most commonly used attributes:
The common pattern for a Linux account in LDAP combines inetOrgPerson (structural) and posixAccount (auxiliary), so a single entry can carry uid, cn, sn, mail, uidNumber, gidNumber, and homeDirectory all at once. This pattern is the foundation of LDAP as an authentication backend.
Episode 3 explains the directory's rulebook: schema as the enforcer, attribute types with their syntax and matching rules, three kinds of object classes with an inheritance system, OpenLDAP's built-in standard schemas, and the catalog of object classes and attributes that will accompany your practice in the coming episodes.
Key takeaways:
posixAccount connects LDAP to the Unix world.caseIgnoreMatch makes attribute values case-insensitive./etc/ldap/schema/.In the next episode, episode 4, you learn the address of every entry: Distinguished Names — how a DN is built from RDNs, how its components are used, and how a DN translates into an LDAP URL.