admin wrote:With the help of the previous poster, we've determined that Address Book on Mac doesn't work like it should.
Thanks to Anil for being patient enough to sit through my repeated attempts to ask him what things looked like on the LDAP server's side of things. 
In any event, FreeLDAP.org does seem to work reliably for me using Address Book on Mac OS X 10.5.2 as long as I don't use strict SSL. What this means is that, in Mac OS X 10.5 Leopard, the individual directory's LDAP preference sheet includes a "Allow self-signed certificate" checkbox—make absolutely sure this checkbox is checked or any SSL connection to FreeLDAP.org will not work.
Furthermore, it's annoying but true that any changes you make in the directory's LDAP settings sheet require you to completely exit out of Address Book and then relaunch it to take effect. Any searches you perform after changing the settings but before you quit still use the old settings, which is why this was so confusing without the help of debugging tools.
admin wrote:- SSL doesn't quite work all the time. But be sure to select SSL option but change port to 389 (don't use 636). This will make it use TLS instead of SSL.
Indeed, SSL is flakey and the ldapsearch utility in Mac OS X 10.4.11 or Mac OS X 10.5.2 seems to behave equally badly! That said, you may not need to use port 389 for LDAP searches to succeed.
Here are the nitty-gritty details from my personal troubleshooting logs regarding how I figured this out:
Deleted and reconfigured the test directory pointing at FreeLDAP.org, like so:
Server: ds1.us.freeldap.org
Port: 389
Use SSL: UNchecked
Search Base: o=entic.net
Scope: Subtree
Authentication: Simple
User name: uid=username, ou=People, o=entic.net
Password: ********
* Search…Little Snitch prompts for access for Address Book to port 389 (LDAP), granted…success!
* Changed Use SSL to CHECKED and Port to 636 ("Allow self-signed certificate" is UNchecked)
* Search…success! Why no Little Snitch request to port 636?
* Quit application, relaunched.
* Search…NOW Little Snitch is prompting for access for Address Book to port 636, granted…failure.
* Changed Port to 389.
* Search…failure.
* Quit application, relaunched.
* Search…failure.
* Changed Use SSL to UNchecked.
* Search…failure.
* Quit application, relaunched.
* Search…success! LDAP search succeeds after SSL is removed, port is reverted to 389, and Address Book.app is quit and relaunched.
* Changed Use SSL to CHECKED, Port to 636, and "Allow self-signed certificate" to CHECKED
* Search…success! Of course, since I bet Address Book did not make any real change to the LDAP connection parameters.
* Quit application, relaunched.
* Search…success! Wait, what?
* UNCHECKED "Allow self-signed certificate"
* Search…success! (Of course…no change.)
* Quit application, relaunched.
* Search…failure. Aha!
* Re-CHECKED "Allow self-signed certificate"
* Search…failure. To be expected at this point.
* Quit application, relaunched.
* Search…success!
In other words, I originally omitted any and all settings that had to do with SSL. This worked without problems. Then, I enabled SSL settings one at a time, each time quitting and re-starting the Address Book application between changes. I finally ended up with a configuration that looked like this on Mac OS X 10.5.2 and Address Book 4.1:
Server: ds1.us.freeldap.org
Port: 636
Use SSL: CHECKED
Allow self-signed certificates: CHECKED
Search Base: o=entic.net
Scope: Subtree
Authentication: Simple
User name: uid=USERNAME, ou=People, o=entic.net
Password: PASSWORD
where USERNAME is the username you signed up at FreeLDAP.org with and PASSWORD is the password your signed up with.
Hope this helps someone down the line.
Cheers,