[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 ( 1.1.2.2 NAME 'centro'
       DESC 'Centro al que tiene acceso un usuario del programa'
       EQUALITY caseIgnoreMatch
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )


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


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

#
objectclass ( 1.1.2.5
       NAME 'empleado'
       DESC 'Empleado del grupo'
       SUP top
       AUXILIARY
       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
"uid=rlago,ou=alumnos,ou=CentroA,ou=empresas,dc=sgp,dc=com"
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
problems.

Can somebody help me?

Thanks in advance

Rosa