Unix ldapsearch can not contact a Windows LDAP Server

Good morning,

Firstly my appologies if this post is not exactly approprate for this forum but I do not know were else to post it. If anyone knows of a better forum for this please let me know.

I need to script an ldapsearch that will interrogate both unix and windows ldap servers. When it tries to perform the search on a windows server it either just hangs or gets the following error: "ldap_simple_bind: Can't contact LDAP server". These particular servers respond to a ping with "is alive". uname -a run on the Unix box gives:

"SunOS server001 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-V440"

The ldap search is:

 
#!/bin/ksh
export HOST=server.abc.com
ldapsearch -b DC=fhlmc,DC=com \
         -h ${HOST}         \
         -p 636             \
         -D cn=c22107,cn=users,dc=abc,dc=com \
         -w ${PW}           \
         -s sub             \
         "(cn=DOMAINCHECK)" \
         member

Is there something special needed to deal with a Windows LDAP server or am I going to have to do the searches from Windows? I did try the command in a Windows Command Shell and it worked so this would appear to be a cross platform issue? I really do not want to resort to two scripts, one Unix and one Windows unless there is no choice!

Thanks,
twk

Port 636 is SSL. Try it without SSL if possible (ie. if the server is up on it's default noSSL port 389 for example). You could reduce security/specialities even more like trying (if allowed by your LDAP server) with an anonymous bind instead of this named bind.
Also a simple test if it is ping'able can't harm to make sure. Also might want to check if you add in a -v for more verbose output might give a clue. If you have something like nmap at hand you could check which ports are open on your LDAP server to make sure.

Oh and I noticed a slight difference between ldapsearch on AIX and Linux (Debian). Maybe make sure to check the switches/options.