[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: A help in preparing slapd.conf and schema file

>I have tried creating schema and conf file. But its giving some errors. 

What errors ?

>In the above directory structure the "company name" is top level.
>The "organizational unit" refers to the sub groups or divisions in the 
>The "employee" refers to the employees in each organizational unit. Each 
>employee contains the details such as id, name, email id.

If you try to use the above structure for a simple browsable directory, you should
be ok. If you try to use the above structure for anything else, you
might run into problems. More specifically, the above structure will
probably cause problems if you ever want to use LDAP with Courier-IMAP, or Postfix. 

I like this Ldif format best:

dn: uidnumber=12345,dc=companyname,dc=com
uidnumber: 12345
gidnumber: 1001
employeenumber: 12345
cn: Bugs Bunny
sn: Bunny
ou: Sales Division
title: Sales Engineer
description: sells widgets to area 52
email: bugs.bunny@companyname.com
alternatemailaddress: bugs_bunny@companyname.com
objectclass: none_this_is_an_example

You can index the ou: and allow searching on division this way.
Additionally, a format similar to the above will allow name changes
without breaking the schema.

It is not that complicated if you think of it as a database that is
indexed by the dn:. Similar to any relational database Open LDAP has a system
index, the hierarchical database in LDAP is indexed by the dn: line. In
the slapd.conf you can also add other types of indexing as you can do in a
relational db.

>I have installed Openldap2.1.16 with the procedure given in the site.

Have you read the old Quick and Dirty LDAP how to ?

This document also works:

> I am working on it for the past two weeks, but I couldn't get the 
> correct solution. 
> So I am in need of your help in creating the schema, 
> conf,ldif files. I am using Berkeley DB 4.1.

Since you are a "Software Engineer," you should have no problem writing a
tiny Perl,C,Python,Ruby,Java,or C++ program to parse in your employees
from a tab deliminated file and create a .ldif file. ;-)

cat employees.txt | perl create_ldif.pl > myemployees.ldif

Even-though I am not a Software Engineer, I have created many hacked up 
programs that do similar things.

Chester, Maryland, USA