Hello everybody,
I'm front a problem with my openldap 2.3.30 server software and hope you can give me help to solve it. problem is the following one: I use a mozilla schema for my address book but need to make it compliant with another one (window's one) I have found some matching fields from my current model to windows model's one but don't wants to duplicate them and don't wants to define a schema for the window's model. Is there a way to rewrite answer to "add" a field with the value of one of the answer in the answer send to client? for example it's seems that "mozillaNickname" is equal to "surname" in the windows schema, but I don't wants to make a schema for the window's model and just want to send the mozillaNickName attribute and value with a copy of the value for an attribute surname. best regards,
Matthieu
Matthieu wrote:
Hello everybody,
I'm front a problem with my openldap 2.3.30 server software and hope you can give me help to solve it. problem is the following one: I use a mozilla schema for my address book but need to make it compliant with another one (window's one) I have found some matching fields from my current model to windows model's one but don't wants to duplicate them and don't wants to define a schema for the window's model. Is there a way to rewrite answer to "add" a field with the value of one of the answer in the answer send to client? for example it's seems that "mozillaNickname" is equal to "surname" in the windows schema, but I don't wants to make a schema for the window's model and just want to send the mozillaNickName attribute and value with a copy of the value for an attribute surname. best regards,
Matthieu
man slapo-rwm
HTH.
Hello,
Thanks for your feed back So I've try to make somes tests to validate my rewrite rules. Here's part of my slapd.conf:
moduleload rwm ...
overlay rwm rwm-rewriteEngine on rwm-rewriteContext default rwm-map attribute company o rwm-map attribute mailNickname mozillaNickName
it's work fine with company attribute: "company" is found both with two clients. but for nickname, it's appear only with windows' client. so I suppose that another attribute is match under mozilla client for the organization attribute value, but nickname is wrote back but not copy so my question is: how can I specify that I wants to keep mozillaNickName attribute and copy it's value for a mailNickName attribute?
best regards,
Matthieu
Gavin Henry a écrit :
Matthieu wrote:
Hello everybody,
I'm front a problem with my openldap 2.3.30 server software and hope you can give me help to solve it. problem is the following one: I use a mozilla schema for my address book but need to make it compliant with another one (window's one) I have found some matching fields from my current model to windows model's one but don't wants to duplicate them and don't wants to define a schema for the window's model. Is there a way to rewrite answer to "add" a field with the value of one of the answer in the answer send to client? for example it's seems that "mozillaNickname" is equal to "surname" in the windows schema, but I don't wants to make a schema for the window's model and just want to send the mozillaNickName attribute and value with a copy of the value for an attribute surname. best regards,
Matthieu
man slapo-rwm
HTH.
Matthieu wrote:
Hello,
Thanks for your feed back So I've try to make somes tests to validate my rewrite rules. Here's part of my slapd.conf:
moduleload rwm ...
overlay rwm rwm-rewriteEngine on rwm-rewriteContext default rwm-map attribute company o rwm-map attribute mailNickname mozillaNickName
it's work fine with company attribute: "company" is found both with two clients. but for nickname, it's appear only with windows' client. so I suppose that another attribute is match under mozilla client for the organization attribute value, but nickname is wrote back but not copy so my question is: how can I specify that I wants to keep mozillaNickName attribute and copy it's value for a mailNickName attribute?
Simply you can't; slapo-rwm(5) only maps attribute names, does not duplicate them. There are two solutions:
1) write your own overlay that does what you need
2) use virtual databases to allow accessing the same data by two different client types: - use the real database for clients that use the real schema - use a virtual database (namely, a virtual naming context referring to the real one using slapd-relay(5)) which rewrites the naming context and maps the desired attributes according to the schema you want to use.
So, for example:
database bdb suffix dc=real # searches for dc=real return mozillaNickName
database relay suffix dc=virtual overlay rwm rwm-suffixmassage dc=real rwm-map attribute company o rwm-map attribute mailNickname mozillaNickName # searches for dc=virtual return mozillaNickName
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
openldap-software@openldap.org