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

Re: Adding an attribute host



That is exactly what I am saying. For OpenLDAP 2.x, you would need
something like this:
	dn: uid=someusername,ou=People,dc=example,dc=com
	changetype: modify
	add: objectClass
	objectClass: account
	add: host
	host: mchn2.example.com
Being relatively new to OpenLDAP (of the 2.1.x generation), I am not
sure about the sanity checks OpenLDAP 1.x put on data, and it could be
that it did not check such things on input, and your examples would be
silently accepted in OpenLDAP 1.x. Someone with more history in the LDAP
world would have to chime in.

Mike.

>>> Robert Canary <phantom@ohiocounty.net> 02/16/03 06:33pm >>>
Thanks Mike,

Are you saying the "objectClass: account" needs to be in the ldif
file?
All the examples and text I've looked through dosen't indicate putting
it in the file list of records(changes) I am importing.  If so then
would I need to make two "add" statements or just simply create an
extra
line for "objectClass: account"?

Mike O'Rourke wrote:
> 
> Do you have "objectClass: account" in this entry? According to the
> cosine.schema, you need an "objectClass: account" in the in the entry
to
> use the "host" attribute.
> 
> >>> Robert Canary <phantom@ohiocounty.net> 02/16/03 08:38 AM >>>
> 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?
> >
> > --
> > robert