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

Re: person attributes





Alexandra Navarro wrote:

Hello,
I have installed openldap, all is right, but, when i try to create a person
objet, for example:

dn: cn=Pepe Perez, o=larita.eon.net
sn: Perez
cn: Pepe Perez
objectclass: person
userpassword: dsadad
uid: pperez
mail: lala@lele.com

if i put the attributes uid, or mail... the ldapadd allways says:

ldap_add: Object class violation
    additional info: attribute not allowed

I tried to find the file where is defined the objet person, but i didn't
able to find it.
and there isn't slapd.at.conf and slapd.oc.conf in my
/usr/local/etc/openldap

any ideas?
thnx
LaraCroft

My slapd.conf is:

# slapd.conf
include         /usr/local/etc/openldap/schema/core.schema
pidfile         /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args

database        ldbm

rootdn          "cn=Manager,dc=larita,dc=com"

rootpw          --password--

directory       /usr/local/var/openldap-ldbm

index   objectClass     eq



------------------------------------------------------------------
Alexandra Navarro Lahoz (anavarro@eon.es) Departamento de Comunicaciones e Internet EON Informática, S.A. <http://www.eon.es> Pza. Herrera de los Navarros nº 2 50002 ZARAGOZA Tfno. +34 976 203040 Fax +34 976 203050 e-mail eon@eon.es



Hi

First you need to have a look to schema files.
they are located in openldap/etc/schema
Find what attributes you want to add, and what ObjectClass they belong to.
Then, add it to your slapd.conf.
I personaly have :

include /usr/local/openldap/etc/openldap/schema/core.schema
include /usr/local/openldap/etc/openldap/schema/cosine.schema
include /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
include /usr/local/openldap/etc/openldap/schema/nis.schema
include /usr/local/openldap/etc/openldap/schema/mymailrecipient.schema
include /usr/local/openldap/etc/openldap/schema/myperson.schema
include /usr/local/openldap/etc/openldap/schema/mull.schema



I maybe don't need all this... :)

Then, when you create an entry in your ldap, add every ObjectClass that your attribut need, as Stefan Brohs replied.
It's something like :


dn: uid=www, ou=users, ou=oo.net, dc=oo, dc=net
mail: www@oo.net
uid: www_oo_net
objectClass: inetOrgPerson
objectClass: mailRecipient
sn: wwwxxx
cn: www
mailAlternateAddress: stool@oo.net
userPassword: {MD5}eCfr4Fff3Aw7E6FPqdg==


Prune

--
- le Centre - a Mad Cow Tribe product


(Very uncommon, but we should please everybody anyway, even disturbed minds)