[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Protocol error w/ldapsearch against Exchange



On Thu, Nov 07, 2002 at 11:12:26AM -0500, Bryan Rapp wrote:
> I'm brand new to OpenLDAP, but I would like to use ldapsearch to get a list
> of valid email addresses from a MS Exchange 5.5 LDAP directory.  I've read
> through lots of posts about others doing the same thing, so I think my
> syntax is correct, but I keep receiving the following:
> 
> $ ldapsearch -v -x -H ldap://172.16.1.202:389 -b
> "cn=Recipients,ou=SITE,o=ORGANIZATION, Inc." proxyAddresses

Try this (it's for win2k, thoufh):

#!/bin/bash
rm -f liste
for letter in a b c d e f g h i j k l m n o p q r s t u v w x y z
do ldapsearch -z 0 -C -x -H ldap://dc-charite-1.charite.de -b cn=users,dc=CHARITE,dc=de -D cn=administrator,cn=users,dc=CHARITE,dc=de -w "secret" -LLL sAMAccountName=$letter* mail >> liste;
done
awk '/^mail:/ {printf("%s OK\n", tolower($2));}' liste | sort

-- 
Ralf Hildebrandt (Im Auftrag des Referat V a)   Ralf.Hildebrandt@charite.de
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
Why you can't find your system administrators:
Have you checked under the desk/crawlspace?