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 ---------------------------------------