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

Re: attributes tag

Hallvard B Furuseth wrote:

I wrote:

jehan.procaccia writes:

OK so only language tags are documented in rfc-3866, other tags can be
anything you want but should be prefix with "x-" !
is this x- prefix is your personnal recommandation or is it normalized ?

It's from RFC 2251 section 4.1.5. RFC 3383 section 3.4 expands on that:

Come to think of it, you find the answer in the "attributeoptions" section of the slapd.conf manual page. You need that directive to define your new attribute option.

Great ! that work fine , indeed i needed to read slad.conf man page , if I don't define the attributeoptions directive I cannot add my personnal attributes options/tag !
for those interested, here's what I did:

$ grep attributeoptions /usr/local/openldap-2.2.20-1/etc/openldap/slapd.conf
attributeoptions x-dept-
attributeoptions lang-

Search all title(s)
$ ldapsearch -x uid=procacci -h localhost title -D "cn=admin,dc=int-evry,dc=fr" -W -LLL
Enter LDAP Password:
dn: uid=procacci,ou=People,dc=int-evry,dc=fr
title:: SW5nw6luaWV1ciBzeXN0w6htZXM=
title;x-dept-crmp: advisor
title;x-dept-inf: teacher
title;lang-us: system&network engineer

Search x-dept title(s)
$ ldapsearch -x uid=procacci -h localhost "title;x-dept-" -D "cn=admin,dc=int-evry,dc=fr" -W -LLL
Enter LDAP Password:
dn: uid=procacci,ou=People,dc=int-evry,dc=fr
title;x-dept-crmp: advisor
title;x-dept-inf: teacher

Search the specific x-dept-inf title
$ ldapsearch -x uid=procacci -h localhost "title;x-dept-inf" -D "cn=admin,dc=int-evry,dc=fr" -W -LLL
Enter LDAP Password:
dn: uid=procacci,ou=People,dc=int-evry,dc=fr
title;x-dept-inf: teacher

That would respond to my need of giving on person entry multiple title and associate those title to a specific departementNumber/service in the organization. However now I need to preserve a strict coherence between my departementNumber value ("inf" for exemple) and my title attribute option (x-dept-inf here ) !

Before I go editing hundred of users entry and code my php interogation/modification interface to support that, do you recommend such a solution or are there better ones ? I once though about the organizationalRole objectClass defining each and every roles in the organization and point each person entry with the seeAlso attribute to their roles, but again I find this a bit complicated and not easy to maintain ...
any other solution in order to keep a record of multiple titles associated with the departementNumber(s) affectation of one person ?