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

Re: Adding users with email address



Robert Johnson writes:
> In the core.schema it has a definition for a mail attribute but when I 
> try and add the users email address I get an "Object class violation" 
> with additional info of "attribute 'mail' not allowed".

The object classes in an entry decide which attributes MAY and MUST be
included in the entry.  You can see in the 'objectclass' definitions in
the schema files which attrbutes that is.

You need to insert in your entries an object class allows the 'mail'
attribute, since the 'person' object class does not.  E.g.
    dn: cn=rjohnson,dc=costuless,dc=com
    objectclass: person
    objectClass: inetOrgPerson	(from inetorgperson.schema)
    ...
or
    dn: cn=rjohnson,dc=costuless,dc=com
    objectclass: person
    objectClass: pilotPerson    (from cosine.schema).
    ...
(The latter allows attribute 'rfc822Mailbox', which you can see in
core.schema is another name for the attribute 'mail'.)

Merely including the schema file does not help, since that does not
modify your entries.  The schema files merely define the object classes
and attributes so that you can include them in your entries.

-- 
Hallvard