Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Creating LDAP address book entries to share Network

Apple's Address Book (10.2 and up) is a wonderful application. There's even LDAP technology built in, whatever that is. If you are using Mac OS X Server, you will know that through LDAP, your users can get each others' address data. Which is cool if you are with a lot of people on your campus, company, or home. But wouldn't it be more fun to have the address entries of 'outsiders' in there, too (but without making accounts for them on the Server)?

I stumbled on this php tool called phpLDAPadmin which allows me (amongst others) to add phonebook entries in the server once, so that all users can get to these addresses using Apple's Address Book! Caution! LDAP servers are vulnerable to outside peeking and changing; secure them wel!

  1. Get the phpLDAPadmin application
  2. Copy the tool into your webserver folder. (e.g. /Library -> WebServer -> Documents), renaming it to just phpldapadmin, or linking a shorter name to it; whatever suits you.
  3. Make a config.php file. (there's an example file which you can copy, rename and use.)
  4. Change the settings: an example:
      $servers[$i]['name'] = 'server name';
      $servers[$i]['host'] = 'url of the server';
      $servers[$i]['base'] = 'base DN (e.g. dc=mydomain,dc=com)';
      $servers[$i]['port'] = 389; 
      $servers[$i]['auth_type'] = 'form or config, (form works best i think)';
      $servers[$i]['login_dn'] = 'uid=myusername,cn=users,dc=mydomain,dc=com';
      $servers[$i]['login_pass'] = 'my password';      
    The config example has a lot more comments, by the way.
  5. Open up Safari, and surf to the webpage (http://server_url/phpldapadmin): if all is well, you will see the tree of your LDAP server
  6. Create new entry in this tree of type Organisational unit (ou), called for example "phonebook"
  7. Expand this Phonebook entry and now Create New entry, this time of type Address Book Entry. Repeat this for all your outsiders' records
  8. On any Mac in your network, open Address Book. Go to Preferences and select the LDAP tab.
  9. Add an LDAP entry, using the correct IP address, search base (depending on what you created in step six, ou=phonebook in my case), username and password.
  10. In the main window of the Address Book itself, click on Directories, and search for an entry you have previously entered, et voila!
Of course, only step 7 (to add entries) and step 10 (to consult them) need to be performed regularly. Have fun, and let me know if you know how I can enter entries in an LDAP server using ApplScript!
  • Currently 2.63 / 5
  You rated: 2 / 5 (8 votes cast)

Creating LDAP address book entries to share | 17 comments | Create New Account
Click here to return to the 'Creating LDAP address book entries to share' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Creating LDAP address book entries to share
Authored by: davo_zero on Jan 22, '04 09:15:21PM

LDAP = Light Directory Access Protocol

just so you can sound ultra geek next time you reference it.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: dintal on Jan 22, '04 11:09:38PM

Lightweight Directory Access Protocol

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: tji on Jan 23, '04 04:32:08PM

This is a good tip.. Many applications, like Mozilla, can use LDAP directories for their address book.

In my system, the naming structure was slightly different. It didn't contain my domain components. My DN was just "uid=tji, cn=users". This is probably due to some configuration option when I installed Jaguar.

It would be nice if the Address Book application allowed you to write to the directory server. The PHPLDAPAdmin interface is okay, but could be much better. To use this a s a full Address Book, you will also probably want to add attributes to the user record.. I like to keep birth dates, anniversaries, etc.

Also, as the author mentioned, this can expose sensitive OS and user information via LDAP.. If you want to dig into the OpenLDAP configuration, you can set access controls, but the config is a bit complex. Also, I hesitate to monkey with the config files too much, as they will probably get overwritten in an application or OS upgrade.

[ Reply to This | # ]
Need Server?
Authored by: jason mark on Jan 24, '04 09:08:48AM

Do you need OSX server to run an LDAP server? I had orginally read this to mean that by running the admin tools I could run an LDAP on my Panther (non-server) machine, and share with other ppl in the office, but that appears to not be the case.

[ Reply to This | # ]
Need Server?
Authored by: tji on Jan 25, '04 05:30:23PM
There is another article here on how to enable LDAP.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: jecwobble on Jan 26, '04 11:22:38AM

I just want to share my addresses with my wife (on the same computer) and vice versa. When either one of us updates a given person or group, I want the change to be reflected in the other user's account.

I haven't read too deeply into this hint, but at first blush, it seems like overkill for my needs. I have no home network to speak of (connect a Pismo via AirPort and Ethernet from time to time), so I have no other uses for LDAP that I can think of, and I want something that requires little or no maintenance (although I don't mind a little setup time). And I don't want to make my computer any more 'insecure' than it already is.

Can anyone familiar with LDAP confirm that it's not what I'm looking for? Anyone offer an alternative for my needs? Thanks.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: Nimitz on Jan 27, '04 05:03:25AM

There are easier (and mostly commercial) solutions for addressbook sharing.

The hint is intended for those of us who work in a small (5+ users) to large corporate/educational or governmental organisation. And for those that like to fiddle with their expensive but omnipotent MacOS X Server software, so that they can use free technology to accomplish the same (albeit more powerfull) result than commercial programs.

Come'on Apple, implement a 'Share your address-book via Rendez-Vous' function in AddressBook for the masses!

The Nimitz

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: CHRISMURPHY on Aug 17, '04 03:54:29PM

Also have the same problem. Have you managed to sort it???

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: jstal on Aug 31, '04 08:52:07AM

Maybe you just need a single contact database file in /Users/Shared. Most PIM programs won't like having the file opened by two copies of the software, so quit in one user before starting in another user. This could be an issue if you use fast user switching.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: LostInSpace2011 on Mar 11, '04 02:43:38AM

If you always wanted to publish your address book or a limited subset, such as an individual or group with other this is the tool for you. It allows you to transfer a selection from your address book to a central LDAP server, such as Open Directory (included with Panther Server). Various other option to set up a LDAP directory server are available.


[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: Ton on May 15, '05 06:48:23PM


I like to use the program phpLDAPadmin, what browser do i have to use for downloading this program?? I tried clicking the links with Safari, Explorer, Mozilla and firefox and nothing happens, once i had file on my desktop but it was unable to use impossible to unpack also........

[ Reply to This | # ]
missing GETTEXT support
Authored by: eboelens on Apr 09, '06 09:39:27AM

I found the following error after surfing to http://..../phpldapadmin/

Your install of PHP appears to be missing GETTEXT support. GETTEXT is used for language translation. Please install GETTEXT support before using phpLDAPadmin. (Dont forget to restart your web server afterwards)

OSX server 10.4.6

any idea please howto ?

thanks for your time


[ Reply to This | # ]
missing GETTEXT support
Authored by: gkjapan on Apr 24, '06 08:08:03PM
I had to upgrade to PHP 5.1.2 in order to get it to work. (
His site is
Hope that helps.

[ Reply to This | # ]
Another LDAP Browser/Editor
Authored by: gkjapan on Apr 24, '06 08:15:35PM
You can also use LDAD Browser/Editor, a java app that lets you do what phpldapadmin does, but doesn't rely on PHP.

I'm still trying to figure out which solution is better, but at least this may be a solution for some that don't want to mess with PHP.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: LostInSpace2011 on Nov 02, '06 02:22:58PM
AddressBookXLDAP allows the direct transfer of contact from the Addressbook to a centrally shared LDAP directory. It has support for several mappings which can be extended and customised. This allows users to share their contacts using a standard protocol and does not require a subscription. LDAP can also be accessed from a number of different applications, such as Mail, Thunderbird or Outlook.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: mitra on Dec 21, '06 04:22:45PM

Instead of updating to an LDAP server, it would be nice for some simple LDAP server, running on the Mac, to access the Address Book as its data store? That way Thunderbird and other mail clients which don't have Address Book integration, but do have LDAP integration could just access the Addres s Book entries directly.

[ Reply to This | # ]
Creating LDAP address book entries to share
Authored by: atria78 on Mar 04, '07 01:53:56PM
You could try this LDAP address book website. You create addresses, share them, and then you can use their LDAP server with mac

[ Reply to This | # ]