Home

Search this site:
 

Horshack’s
very
own site

 

This is Bavaria, Germany!
You will find links to Perl,
bootdisks for system administration,
a lot of Linux,
Windows administration
and some personal belongings.
First Steps in LDAP

A web-based programm for Administration of LDAP

Programs which seem to be useful

LDAP-Browser or

First Steps in LDAP

I want to have a simple addressbook with telephonenumbers and email-addresses to be reached from every mail-client I use. The addressbook shall be built and modified automatically from a database which is the main datasource.

 

Structure

Data must be structured for LDAP. Our internet-domain is zirndorf.de, so I use that. Under that there is a unit in which all the people are.

simple_structure.gif

Preparing LDAP-server

I use Debian-Linux for the LDAP-server and install this packages:slapd, ldap-utils. Take care that these files get installed in /etc/ldap/schema/:

Now I have to modify the file /etc/ldap/sladp.conf:

The server should listen only to a special IP-address (slapd is running under vserver-Linux) so I have to start the server like this in the start scripts: Starting LDAP (and checking bind with "netstat -ln" if you like).

Creating Organization Units

Create a file ou_people.ldif like this:

and import it into the database

 Did the import work? You can dump your whole LDAP-server with this command to check it:

If you have more units like this create more line in ou_people.ldif, some copy the lines I gave you.

Create people in ou=people,dc=zirndorf,dc=de

First create a very simple file to import into LDAP. I did this with Perl from a centralized database where I have all the informations collected:

 Now let's create a person with more attributes:

Commands to delete and modify records

To delete a record this you have to know the dn (unique record-identifier):

Recursively delete: ldapdelete -r ...

If you want to modify a record you have to modify it completely. ALL the attributes must be in your ldif-file!

Query the LDAP-database from your mailprogram, how to configure

You have to know:

Impressum