Differences in using ldapsearch on Linux and Solaris


This one caused me a lot of frustation. On my Sun box, running Solaris 8 and with a 4.x version of iPlanet Directory Services (really old), I could query the Active Directory of one of our Exchange servers quite easily:

ldapsearch -h mnmtkex6 sn=scheie

And I'd get an answer back. But using the same syntax on a Linux box, with the ldapsearch tool courtesy of OpenLDAP, I'd only get a protocol error. Even adding '-x', to avoid SASL, didn't fix the problem. Turns out, for whatever reason, on the Linux box I have to include a searchbase with the -b parameter, like so:

ldapsearch -x -h mnmtkex6 -b "cn=Recipients,ou=Marion,o=Acme Partners" sn=scheie

03/14/2005