Diagnose Mac OS X Address Book LDAP problems

3

1

I've configured a LDAP server in my Address Book preferences on Snow Leopard. I determined the base DN from a helpful recipe on the web using ldapsearch.

I never get any search results. Has anyone got a way to force Address Book to reveal what it's doing? I can't tell if it's having connection problems, or ldap problems, or what.

bmargulies

Posted 2009-11-29T14:32:22.933

Reputation: 1 121

Have you tried using LDAP from Mail, to see if you have problems there also? – Lawrence Velázquez – 2009-11-30T05:07:40.450

yes. It crashes mail altogether when I have this ldap server turned on (!) – bmargulies – 2009-12-02T23:27:41.013

Answers

1

Most directory servers maintain a log of client access. Examine this log, it will contain each request and result issued by Address Book. For example:

[27/May/2011:05:59:14.672 -0400] CONNECT conn=11 from="127.0.0.1" to="127.0.0.1" protocol="LDAP" clientConnectionPolicy="Restrictive client connection policy."
[27/May/2011:05:59:14.879 -0400] SEARCH RESULT conn=11 op=0 msgID=1 base="dc=example,dc=com" scope=2 filter="(&(|(givenname=user*)(sn=user*)(mail=user*)(cn=user*)))" attrs="givenName,sn,cn,mail,telephoneNumber,facsimileTelephoneNumber,o,title,ou,buildingName,street,l,st,postalCode,c,jpegPhoto,mobile,co,pager,destinationIndicator,IMHandle,labeledURI,appleAIMpreferred" resultCode=11 message="This search operation has checked the maximum of 5000 entries for matches" etime=204.608 entriesReturned=0

This shows that the operator had typed the string user into the search box of address book. Address Book searched the directory server for attributes givenName, sn, mail, and cn where the attribute began with the value user. The Address Book requests a large number of attributes that, should entries be returned from the search, will be used to create Address Book entries.

Terry Gardner

Posted 2009-11-29T14:32:22.933

Reputation: 827

Sadly, I can't easily get inside the logging of the MS Active Directory which is the ldap server in question. – bmargulies – 2011-05-27T10:31:00.583