LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   OpenLDAP query Active Directory (https://www.linuxquestions.org/questions/linux-server-73/openldap-query-active-directory-638860/)

noir911 04-30-2008 06:18 AM

OpenLDAP query Active Directory
 
I am querying AD to get user email address and aliases but it is giving me lots of other information that I don't need. I was wondering if it is be possible to filter the query in slapd.conf to give me what I need.

Here's my slapd.conf

Allow bind_v2
access to dn.base=""
by * read
access to *
by * read
database ldap
suffix "dc=ad3,dc=merog,dc=org"
uri "ldap://ad3.merog.org"
query_filter=(PROXYADDRESSES :smtp:%s@*)
cachesize 10000
sizelimit unlimited

I am trying to query for PROXYADDRESSES which comes like this: PROXYADDRESSES: smtp:username@merog.org

Here's my query:

ldapsearch -x -h ad3.merog.org -b "dc=ad3,dc=merog,dc=org" cn="user name"

I don't want to use any sed, awk script to achieve the result. Just would like to use openldap itself if that's at all possible.

Thanks for any help.


All times are GMT -5. The time now is 04:48 PM.