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

Re: Adding an attribute host



Hi,

On Sunday 16 February 2003 08:29, Robert Canary wrote:
> I'm using the ldapmodify with and ldif file whcih has the following:
>
> dn: uid=someusername,ou=People,dc=example,dc=com
> changetype: modify
> add: host
> host: mchn2.example.com
>
> However, I am getting this:
>
> ldap_modify: Object class violation
>              additional info: attribute 'host' is not allowed
>
> 'host' is in the cosine.schema.  cosine.schema is included in the
> slapd.conf
>
> Robert Canary wrote:
> > How do I add an attribute?
> >
> > I am reading through a mandrake doc on openldap, and they point out a
> > good idea (which applies to my scenario), of limiting the host for which
> > a given person can log onto.  The include the 'host' attribute, however,
> > it is not anywhere in the schemas.  How do I go about adding the 'host'
> > attribute, to the passwd records?

you cannot simply add an attribute to any object you want.

LDAP is based on the concept of objectclasses that require (MUST)
or allow (MAY) some attributes.
If the objectclasses you use, do not allow / require the host attribute,
you will get the error you mentioned.
Have a look at the schema files. They tell you exactly what you need.

Maybe additionally a book about the LDAP basics cannot hurt too.

Peter

-- 
Peter Marschall     |   eMail: peter.marschall@mayn.de
Scheffelstraße 15   |          peter.marschall@adpm.de
D-97072 Würzburg    |   Tel:   +49 931 14721
PGP: 0BB1 04A3 0FB0 E27F 8018 52BA A286 7B23 9C22 2C83