The LDAP server daemon is called Slapd. Slapd supports a variety of different database backends which you can use.
They include the primary choice BDB, a high-performance transactional database backend; LDBM, a lightweight DBM based backend; SHELL, a backend interface to arbitrary shell scripts and PASSWD, a simple backend interface to the passwd(5) file.
BDB transactional backend is suited for multi-user read/write database access, with any mix of read and write operations. BDB is used in applications that require:
Transactions, including making multiple changes to the database atomically and rolling back uncommitted changes when necessary.
Ability to recover from systems crashes and hardware failures without losing any committed transactions.
In this document I assume that you choose the BDB database.
To import and export directory information between LDAP-based directory servers, or to describe a set of changes which are to be applied to a directory, the file format known as LDIF, for LDAP Data Interchange Format, is typically used. A LDIF file stores information in object-oriented hierarchies of entries. The LDAP software package you're going to get comes with an utility to convert LDIF files to the BDB format
A common LDIF file looks like this:
dn: o=TUDelft, c=NL o: TUDelft objectclass: organization dn: cn=Luiz Malere, o=TUDelft, c=NL cn: Luiz Malere sn: Malere mail: email@example.com objectclass: person
As you can see each entry is uniquely identified by a distinguished name, or DN. The DN consists of the name of the entry plus a path of names tracing the entry back to the top of the directory hierarchy (just like a tree).
In LDAP, an object class defines the collection of attributes that can be used to define an entry. The LDAP standard provides these basic types of object classes:
Groups in the directory, including unordered lists of individual objects or groups of objects.
Locations, such as the country name and description.
Organizations in the directory.
People in the directory.
An entry can belong to more than one object class. For example, the entry for a person is defined by the person object class, but may also be defined by attributes in the inetOrgPerson, groupOfNames, and organization objectclasses. The server's object class structure (it's schema) determines the total list of required and allowed attributes for a particular entry.
Directory data is represented as attribute-value pairs. Any specific piece of information is associated with a descriptive attribute.
For instance, the commonName, or cn, attribute is used to store a person's name . A person named Jonas Salk can be represented in the directory as
cn: Jonas Salk
Each person entered in the directory is defined by the collection of attributes in the person object class. Other attributes used to define this entry could include:
givenname: Jonas surname: Salk mail: firstname.lastname@example.org
Required attributes include the attributes that must be present in entries using the object class. All entries require the objectClass attribute, which lists the object classes to which an entry belongs.
Allowed attributes include the attributes that may be present in entries using the object class. For example, in the person object class, the cn and sn attributes are required. The description, telephoneNumber, seeAlso, and userpassword attributes are allowed but are not required.
Each attribute has a corresponding syntax definition. The syntax definition describes the type of information provided by the attribute, for instance:
ces case exact string (case must match during comparisons).
cis case ignore string (case is ignored during comparisons).
tel telephone number string (like cis but blanks and dashes `- ' are ignored during comparisons).
dn distinguished name.
Note: Usually objectclass and attribute definitions reside on schema files, on the subdirectory schema under the OpenLDAP installation home.