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 * *
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
As slapo-rwm(5) clearly states, rewriting is only done for DN-valued attributes, and telephone numbers are not DN-valued. So it is not possible.
p.
hmm,
oh well, so do you have any other suggestion here or is this just out of the scope of what slapd is designed to do..
the other option I suppose is to change the fields in AD but thats a tall order when we are talking about 8000+ entries and god only knows who is using them and where in what fashion..
anyways, thanks for responding.
--- On Thu, 7/7/11, masarati@aero.polimi.it masarati@aero.polimi.it wrote:
From: masarati@aero.polimi.it masarati@aero.polimi.it Subject: Re: rewrite answers from AD. To: "Agent Smith" news8080@yahoo.com Cc: openldap-technical@openldap.org Date: Thursday, July 7, 2011, 2:55 AM
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
As slapo-rwm(5) clearly states, rewriting is only done for DN-valued attributes, and telephone numbers are not DN-valued. So it is not possible.
p.
openldap-technical@openldap.org