[lug] adding to a fresh ldap

Andrew Diederich andrew at netdelivery.com
Tue Mar 21 16:35:05 MST 2000


Quick background: I'm trying to hook postfix up to openldap.
I got postfix compiled with ldap support and installed in about 15 minutes.
(I had given up on qmail after about a day.  Groan.)  I took the slapd.conf
file and changed some of the generic entries (like dc=your-domain),
and started ldap.  I re-genericized the examples below. 

The problem is I can't seem to enter anything into the dang ldap db.  I think
the difficulty is I'm trying to enter something too far down the tree, but
I'm not sure what I need to add higher up.  An example:

here's my ldif file.
dn: uid=arddiederich, dc=your-domain, dc=com
objectclass: pfEmail
objectclass: top
maildrop: ard at workstation.your-domain.com
mailacceptinggeneralid: mailer

and the ldapadd command I used:
ldappadd -v -D "cn=root, dc=your-domain, dc=com" -w secret <arduser.ldif

and I got back:
add objectclass:
	pfEmail
	top
add maildrop:
	ard at workstation.your-domain.com
add mailacceptinggeneralid:
	mailer
adding new entry uid=arddiederich, dc=your-domain, dc=com
ldap_add: No such object

And when I do a search, I get:
bash> ldapsearch "objectclass=*"
ldap_search: No such object

and here is the pfEmail class I made up, from slapd.oc.conf:
objectclass pfEmail
        requires
                objectClass,
                uid,
                maildrop,
                mailacceptinggeneralid

and schema checking is off, anyway.


so, does anyone now which incantations I need to make this go?  It may
be that I just need to create some other things with the dc=com, dc=your-domain
bits, or put the uid in the ldif more explicitly?  I've wound up coming at
the whole ldap thing a strange way, so I could easily be missing
something quite base about it.

-Andrew




More information about the LUG mailing list