[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
rewrite answers from AD.
- To: openldap-technical@openldap.org
- Subject: rewrite answers from AD.
- From: Agent Smith <news8080@yahoo.com>
- Date: Wed, 6 Jul 2011 12:55:44 -0700 (PDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1309982144; bh=N7E1mTrrHG0I0NPqpejLXf7xJIZTkPdPB0r1flygR2Y=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=IF+aETLTZFk2B9M5mSiD/+soNkzCkVVCr86DSZh8QGQguZKzZo21N7G0BXz5yYo+YnF7cC5WxLiQ30lxFv+aitHXMjdj9LMXWZBpVAOt5rrFsdUHDqLe1y81I6jcLLM8c+i26xTYInjEN3g/wMSn866pOqS7dzQP/i7U6eB3nc0=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=F8RJewPoHG3eso4mESZKJefbeltM09KYp0+E+XKjFSPazpJQ/TSnJ1/oPWANaJYkXpcFlgIMhkGaw5AI9Btzf/t4BKOKVyEJ6bZ3El3McZPGF/noeDIPLu/ucc7DUJ2x0qJUjP/MBO4olMswGhjTVUbG0e7HbMWdt05SRMlhEBE=;
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 * *