I have slapd configured to proxy off of AD and that is working fine but I need to rewrite the phone number part of the AD answer to read 9xxx-xxx-xxxx from the original answer of xxx-xxx-xxxx so that the IP phones can dial them by clicking on the ldap search results.
an example would help.
when I query the AD with ldapsearch I get this field
telephoneNumber: xxx-xxx-xxxx
what I need is that field to read 9xxx-xxx-xxxx
The IP phones need that field to read 9xxx-xxx-xxxx before they can use it so I configured a proxy thinking I will use rwm-rewrite to reformat that answer but I am having a devil of a time trying to figure out how, there is an example on how to 'eat blanks' on a cn filed answer so that a field with name, last_name will read name,lastname but I can't even get that to work even when I copy/paste it right from the man page of slap-rwm
here are relevent parts of slapd.conf, any suggestions?
I compiled slapd with ./configure --enable-rewrite=yes --enable-rwm=yes --enable-ldap=yes --enable-syslog ;
database ldap
#uri "ldap://ldap.yyy.zzz.edu:389/OU=xxx,DC=yyy,DC=zzz,DC=edu";
uri "ldap://ldap.yyy.zzz.edu:389"
lastmod off
chase-referrals no
suffix "DC=yyy,DC=zzz,DC=edu"
acl-bind
bindmethod=simple
binddn="CN=Radius Ldap,OU=System Accounts,OU=MSIS,OU=Administration,OU=xxx,DC=yyy,DC=zzz,DC=edu"
credentials="password"
idassert-bind
bindmethod=simple
binddn="CN=Radius Ldap,OU=System Accounts,OU=MSIS,OU=Administration,OU=xxx,DC=yyy,DC=zzz,DC=edu"
credentials="password"
mode=self
idassert-authzFrom "dn.regex:.*"
access to dn.subtree="DC=yyy,DC=zzz,DC=edu"
by * read
# The last rwm-map line maps all other attributes to nothing.
overlay rwm
rwm-rewriteEngine on
rwm-rewriteContext eatblanks
#rwm-rewriteRule "(.+)2C (.+)" "$1\,$2"
#rwm-rewriteRule "([^,]+), ([^,]+)" "$1,$2"
rwm-rewriterule "(.*), (.*)" "$1,$2"
#rwm-rewriterule "^(.*), (.*)$" "$1,$2"
rwm-map attribute uid sAMAccountname
#rwm-map attribute cn cn
rwm-map attribute * *