Weblog entry #2 for kapal

Ldap and mail in Debian
Posted by kapal on Mon 16 Oct 2006 at 14:35
Tags: none.
I've successfuly installed and configured courier on Debian 3.1 Sarge/stable. I've got slapd installed and working, authenticated via ssh, login, apache2... But still haven't succeeded configuring courier against it.

Here's how it looks:

I tried to add example account, ldif file below:

dn: uid=test, ou=Mail, dc=example, dc=com
userPassword: encrypted
mailMessageStore: /home/test/Maildir/
mailbox: /home/test/Maildir/
mail: test@example.com
ou: Mail
uid: test
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson

what i get, when ldapadd'ing this file is:


ldap_add: Undefined attribute type (17)
additional info: mailMessageStore: attribute type undefined

So i looked into /etc/ldap/schema, and found that no mail schema is installed.
I apt-cached found none approprieate schema for courier, googled a bit, and found courier schema, but it didnt work.

I guess approprieate schema should be provided in some package in the Debian distro, either with courier-ldap or as a separate package. Tell me if im wrong, bu t it should be reported or maybe im mistaken somewere.

 

Comments on this Entry

Posted by daemon (155.232.xx.xx) on Mon 16 Oct 2006 at 15:14
[ Send Message | View Weblogs ]
Testing has a package that courier-ldap depends on called "courier-authlib-ldap" which includes the schema files.

If you're new to debian I doubt that you want to start mixing your versions and pulling in some testing packages into your stable box, so my suggestion would be to download the courier-authlib-ldap package from testing, and extract the "authldap.schema.gz" from the data.tar.gz file in the deb archive (deb files are just library archives created with the `ar` -- check the `ar` man page on how to extract files).

You should be able to then include the schema file (after gunzip'ping it) in your slapd.conf. Hopefully it'll be that simple, but you never know... ;-)

Cheers.

[ Parent | Reply to this comment ]

Posted by kapal (83.8.xx.xx) on Mon 16 Oct 2006 at 16:06
[ Send Message | View Weblogs ]
Im not new to Debian, only to ldap :-) and actually I'm using testing on other box, but it is strange for me, that this package wasnt included in the stable...

[ Parent | Reply to this comment ]

Posted by alfadir (141.58.xx.xx) on Tue 17 Oct 2006 at 07:58
[ Send Message | View Weblogs ]

In February I wrote my first weblog about my plans for LDAP. Email and apache2 integration. Also found some scripts to make Mailman use LDAP data. Hope to get them to work if there are no other alternative.

Now my server is installed and running and I have started to configure the beast. I have no real experience with LDAP before and it seems like all the guides describe how to install it, at lenght from tar.gz files. Then goes through the initial slapd.conf configuration. Well, that is done with a simple apt-get.

The schema and database layout is not so much discussed.
Right now I think I will go with a :

dn: ou=people, dc=example,dc=com
ou: people
description: All people 
objectclass: organizationalunit
and
dn: ou=groups, dc=example,dc=com
ou: groups
description: All groups
objectclass: organizationalunit
and
dn: uid=alfadir,ou=people,dc=example,dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Alfadir
sn: alfadir
uid: alfadir
userpassword: ********
mail: *************
description: Admin

Well, more info per person, but a flat person structure with dn: uid and not dn: cn that some tutorial shows. Anyone have more tips ? What objectclass to use ?

The idea is to add a person to different groups, maillists etc. and that information can be used in different applications like exim, Mailman, webinterface etc.

Do anyone have a nice tool to edit LDAP (in Debian) ?
Right now I am using ldif files and trying to get all the syntnax right. It is a remote server and once I have SSL up and running it would be cool to be able to connect to the box with a standalone LDAP browser. (not so interested in setting up some kind of webinterface, would then open the SSL LDAP port on demand in the firewall)

Link I found along the way : LDAP for Rocket Scientists

Also why are the libnss-ldap.conf and pam_ldap.conf based on different CVS ldap.conf (testing)? Does it matter ?

@(#)$Id: ldap.conf,v 2.47 2006/05/15 08:13:44 lukeh Exp $
@(#)$Id: ldap.conf,v 1.36 2005/03/23 08:29:59 lukeh Exp $

Experiences ? Tips ? Discussions ?

[ Parent | Reply to this comment ]

Posted by Anonymous (158.75.xx.xx) on Tue 17 Oct 2006 at 08:16
Actually i went the easy way when dealing with ldap. I installed slapd, migration-tools and courier-ldap, configured pam to manage my shell logins, and installed phpldapadmin to have easy and convinient (especially to the users) ldap interface. I organized the directory structure and everything seemd to work fine till i got this error, which i guess was all about missing mail schema in Sarge/stable:
Undefined attribute type (17)
additional info: mailMessageStore: attribute type undefined 

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search