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

Re: Help in setting up Ldap Address book



<0.2$>
Looks to me like you are trying to use an objecClass that doesnt exist in the schema (MailRecipient).
Does the objectClass *really* exist??
You can`t just add an objectClass to an entry if there is no reference to that objectClass in your schema files.
</0.2$>


What attributes are you hoping to use in this schema?? Are those attributes provided in an objectClass that already exists in your schema? If not you could try looking for schema files in the wild that *do* have the required attributes. There is a schema file that comes in the debian version of postfix-ldap that contains a few mail like attributes that might provide you with what you need.

Huw


Glynn S. Condez wrote:

Hi All,

I am setting up an Ldap address book and I encountered problem while
populating the database.

When I'm adding the data to the database using ldapadd I got this error and
I think its a schema problema?

[root@server openldap]# ldapadd -x -D
"cn=root,dc=server,dc=mydomain,dc=com" -W -f addbook.ldif
Enter LDAP Password:
adding new entry "uid=test,ou=people,dc=server,dc=mydomain,dc=com"
ldap_add: Object class violation
       additional info: unrecognized objectClass 'MailRecipient'
ldif_record() = 65

Here is my ldif entry:
dn: uid=test,ou=people,dc=server,dc=mydomain,dc=com
uid: test
cn: Test Addressbook
givenname: Test
sn: Addressbook
mail: test@mydomain.com
objectClass: top
objectClass: MailRecipient
objectClass: person
objectClass: inetOrgPerson

and my slapd.conf
----- snip------------------
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/misc.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/nis.schema
---- snip----------------

database        ldbm
suffix          "dc=server,dc=mydomain,dc=com"
rootdn          "cn=root,dc=server,dc=mydomain,dc=com"
rootpw          {SSHA}LWJhQ3JsfTGyy6iZ4gCvaH31bnWOeoKC
#rootpw          {CRYPT}05T/JKDWO0SuI
directory       /usr/local/var/addressbook
index   objectClass,uid,uidNumber,gidNumber,memberUid   eq
index   cn,mail,surname,givenname
----------------- EOF--------------

What should be the problem?

Is there any sites that you can refer where I could read docs regarding
Address book ldap howto ?

TIA
--- Glen ---