This rule work fine. I've tried to do the same rule for departmentNumber
and departmentUID RDN change but slapd doesn't start if I set this
following rules :
Did you define the uid2number map?
rwm-rewriteContext searchEntryDN rwm-rewriteRule "^(.+,)?(uid=[^,]+),dc=example,dc=com$" "$1mail={uid2mail($2)},o=Example,c=US" ":I" rwm-rewriteRule "^(.+,)?(departmentUID=[^,]+),dmdName=[^,]+,dc=[a-zA-Z]+,dc=example,dc=com$" "$1departmentNumber={uid2number($2)},ou=services,o=Example,c=US$" ":@I"
Yes I've theses following directives :
rwm-rewriteMap ldap number2uid "ldap://:389/dc=example,dc=com?departmentUID?sub" rwm-rewriteMap ldap uid2number "ldap://:389/dc=example,dc=com?departmentNumber?sub"
rwm-rewriteRule "^(.+,)?dc=example,dc=com$" "$1o=Example,c=US" ":@I"ïThis rule isn't needed when I'm using "massage" argument for "relay" directive.See above.
Last question : can I modify returned attribute value using rwm ?Only DN-valued attributes. It (intentionally) doesn't work for other attrs.
Ok. It's easy to enable ?
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 ---------------------------------------