Kartik Subbarao wrote:
I'd like to rewrite the following entry:
dn: uid=user@olddomain.com,dc=olddomain,dc=com uid: user@olddomain.com mail: user@olddomain.com
to appear and behave like this:
dn: uid=user@newdomain.com,dc=newdomain,dc=com uid: user@newdomain.com mail: user@newdomain.com
I can get the DN rewritten with slapd-relay and rwm-suffixmassage, and can use rwm-rewriterule with the searchFilter and searchEntryDN contexts to return the entry when querying for mail=user@newdomain.com. But I can't figure out how to rewrite the *values* of the uid and mail attributes in the returned entry to user@newdomain.com. What is the best way to achieve this?
Thanks,
-Kartik
Nothing in OpenLDAP rewrites non-DN attributes.
You could try using slapo-sock and put together an external process to do it.