When I was looking around for a tool to synchronize my Palm handheld with LDAP, I came across the Perl program “pdb2ldif” (original version can be found here). I liked the general idea of it and decided to add some additional features. The result is version 1.2 which you can download from this page.
It differs from the original version in the following ways:
- You can now also provide an LDAP organization on top of the “dc” entry. I use this feature to hold my Palm contacts in a completely separate branch of my LDAP directory. This parameter is optional.
- You can make use of the Palm categories. The original version put all entries in a flat structure, which not only looks a bit untidy but more importantly is a loss of information. By using the switch “–useCategories” the Palm categories will be extracted and mapped to “ou”-entries in the output. This parameter is optional.
- Also, the code base was cleaned up and the naming of the variables changed to make clear which ones are related to Palm or LDAP.
To find out about the parameters, please call the program with the “–help” parameter or have a look into the source code.
Get yourself a decent tool to synchronize the Palm with your Linux/UNIX box. Having looked around on the web, I found J-Pilot. It has been available for quite some time and seems to have a good reputation. There are other programs around but you should be very careful when evaluting them. Personally I suffered from a heavy loss of data when trying an older version of KPilot. You will also need Pilot Link for the low-level connection with the Palm device and as prerequisite for J-Pilot.
Install Pilot Link and J-Pilot and get them working. When you have performed a successful synchronization, you will have a file Address.pdb sitting in the J-Pilot directory, which is ~/.jpilot on my Debian Linux box (Woody). This file contains all data needed by pdb2ldif.
Additionally, you need the Perl modules “Palm::PDB” and “Palm::Address” to run pdb2ldif.
If you have a Debian system you can simply issue the following command to install all components mentioned above (make sure that you are root):
apt-get install jpilot jpilot-plugins libpalm-perl pilot-link
Since J-Pilot is built with GTK, you might get some additional packages onto your harddisk.
Download and Getting Started
Click here to download version 1.2 of pdb2ldif.
Do a test run by calling
pdb2ldif –dc=mydomain –useCategories ~/.jpilot/Address.pdb > ~/address.ldif
where you should replace “mydomain” with the appropriate value for your LDAP server. You should now have a proper LDIF file in your home directory. This can be imported into your LDAP tree