Unix ldapsearch can not contact a Windows LDAP Server

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unix ldapsearch can not contact a Windows LDAP Server
# 1  
Old 10-15-2009
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:

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)" \

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!

# 2  
Old 10-15-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

2. UNIX for Dummies Questions & Answers

Deletion of list of user based on a text file In LDAP UNIX server

Dear All, It would be really nice, if you could help me to write a script for deletion of list of user( more than 15000 users) stored in a file and sorted by email address( i need deletion of only a particular type of mail address). Is the any script to write and take the file as input and... (3 Replies)
Discussion started by: Chand
3 Replies

3. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

4. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

5. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

6. UNIX and Linux Applications

Server migration from samba+ldap to windows server 2003

Hi, i have a server installed samba+openldap (pdc). Need to migration windows server 2003 (active directory) object users, computers. Where you can read how to do it? Or can tell me how to do it? Thanks. P.S. Sorry for bad english (0 Replies)
Discussion started by: ap0st0l
0 Replies

7. UNIX for Dummies Questions & Answers

Changing windows server alias name on windows or unix?

My situation is that we have production unix scripts that ftp files over to a windows server. I'm not sure if its a 2000 or 2003 server as I dont work on server, more on the unix side. It turns out that they are changing servers on the network. So they are migrating our data over from say Server 1... (1 Reply)
Discussion started by: NycUnxer
1 Replies

8. UNIX for Dummies Questions & Answers

Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server

I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of... (5 Replies)
Discussion started by: madhunk
5 Replies

9. UNIX for Dummies Questions & Answers

ldapsearch (Can't contact ldap server)

Hi, Can somebody help me with ldapsearch? I am a newbie with linux and trying to do a ldapquery to resolve a full name from Active Directory? When i give the command ldapsearch -h sso541885 "cn=mloon" I get the error "ldap_sasl_interactive_bind_s: can't contact ldap server Regards, ... (6 Replies)
Discussion started by: vanloonmichel
6 Replies
Login or Register to Ask a Question