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

Problems with alias object and an objectclass of my own

I have created a schema like the following

attributetype ( NAME 'centro'
       DESC 'Centro al que tiene acceso un usuario del programa'
       EQUALITY caseIgnoreMatch
       SYNTAX )

attributetype ( NAME 'rol'
       DESC 'rol que desarrolla un empleado'
       EQUALITY caseIgnoreMatch
       SYNTAX )

objectclass (
       NAME 'alumno'
       DESC 'Alumno del grupo'
       SUP top
       MUST centro )

objectclass (
       NAME 'empleado'
       DESC 'Empleado del grupo'
       SUP top
       MUST (rol $ centro) )

I include it in the slapd.conf without problems

and I can use these objectclasses to create new entries in the DIT. The
problem arises when I try to create an entry that is an alias to another
object in the DIT using the ldif file that follows

dn: uid=plopez,ou=gente,dc=sgp,dc=com
uid: rlago
cn: Rosa
sn: Lago
objectclass: top
objectclass: person
objectclass: uidobject
userpassword: ninguna

dn: uid=rlago,ou=alumnos,ou=CentroA,ou=empresas,dc=sgp,dc=com
uid: rlago
objectclass: alias
objectclass: uidobject
objectclass: alumno
centro: Vigo
aliasedobjectname: uid=rlago,ou=gente,dc=sgp,dc=com

I get a syntax error like this

C:\OpenLDAP>ldapadd -x -D "cn=Manager,dc=sgp,dc=com" -W -f ldif3.ldif
Enter LDAP Password: adding new entry "uid=rlago,ou=gente,dc=sgp,dc=com"

adding new entry
ldap_add: Invalid syntax (21)
       additional info: objectclass: value #2 invalid per syntax

obviously the centro attribute syntax is correct, but for some reason it
fails when used with alias objectclass.

And the problem is with that because if I create the same entry without
the objectclass: alumno and centro: Vigo I create the entry without

Can somebody help me?

Thanks in advance