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

Attribute not allowed when adding mail to person



Hi,

I've searched the archives, but can't see anything relevant.

I am using openldap-2.0.7, with a basically blank ldap database (only
having the Manager entry as defined in the docs).

I want to add in a user using the following ldif file:-

# Brian
dn: cn=Brian Craigie,dc=necs.demon.co,dc=uk
objectClass: person
cn: Brian S. Craigie
sn: craigie
mail: Brian.Craigie@necs.demon.co.uk
title: Unix Systems Administrator
uid: brianc

When I try to use ldapadd I get the following:-

ldap_initialize( <DEFAULT> )
add objectClass:
        person
add cn:
        Brian S. Craigie
add sn:
        craigie
add mail:
        Brian.Craigie@necs.demon.co.uk
add title:
        Unix Systems Administrator
add uid:
        brianc
adding new entry "cn=Nairb Craigie,dc=necs.demon.co,dc=uk"
ldap_add: Object class violation
        additional info: attribute not allowed.

I started with the obvious question "Which attribute is not allowed?" -
the message isn't exactly forthcoming.  I tried to fix schema_check.c to
display that info, but my c isn't good enough.  Perhaps someone could do
that?

Anyway, running slapd in debug mode reveals that is is not happy about
'mail' ['is cool' are my own additional debug lines]:

oc_check_required entry (cn=Brian Craigie,dc=necs.demon.co,dc=uk),
objectclass "person"
oc_check_allowed type "objectClass"
Entry (cn=Brian Craigie,dc=necs.demon.co,dc=uk), attr "objectClass" is
cool
oc_check_allowed type "cn"
Entry (cn=Brian Craigie,dc=necs.demon.co,dc=uk), attr "cn" is cool
oc_check_allowed type "sn"
Entry (cn=Brian Craigie,dc=necs.demon.co,dc=uk), attr "sn" is cool
oc_check_allowed type "mail"
Entry (cn=Brian Craigie,dc=necs.demon.co,dc=uk), attr "mail" not allowed
entry failed schema check: attribute not allowed.

 It would seem that mail isn't allowed in the person object.  Can anyone
please tell me either:

1) how to let me add an email address to the person object or
2) what is the correct object to use to contain an email address

Ultimately, this is an ldap install to hold [primarily] address book
info for Outlook Express and Netscape Messenger clients, so whatever
they look at for email addresses is what I would like to setup -
preferably without any alterations on the clients.

According to /usr/local/etc/openldap/ldaptemplates.conf, the person
object does allow mail, but this file isn't mentioned in any of the
documentation, so I don't know when it is used, if at all.  I did read
the man page, but all it says it that it contains the template for the
LDAP display  routines.

Also, I want to be able to add entries using a gui.  I tried netscape,
but it won't let me log in as manager (user name and password the same
as those supplied to ldapadd on the command line).  Any ideas?


Many thanks for any help anyone can give me.


-- 

Best Regards,

Brian S. Craigie