As a prerequisite, you should have a running LDAP server like OpenLDAP completely configured and accessible. Just to make sure your server's running perfectly, attempt to bind to the server with an application like evolution. For the opensync part, you should have opensync, libsyncml, multisync-gui and ldap-sync plugins installed. You can find all of them as source tarballs on the download page. One this is done, fire up multisync-gui and create a new group with two members: File sync and Ldap sync plugins.
In the provided configuration, fill out the appropriate parameters:
1. $SERVERNAME: Fill in an IP address. If the LDAP server's running on the same computer, fill in "localhost" 2. $BINDDN: Fill in the binddn to your LDAP server. For example, cn=admin,dc=artagnon,dc=com 3. $PASSWORD: Fill in the password corresponding to the binddn specified 4. $SEARCHBASE: Fill in the ou where the contacts are stored. For example, ou=Contacts,dc=artagnon,dc=com
Important note: Do NOT edit the <keyattr> and <searchbase> unless you know what you're doing.
Here's the configuration for the ldap-sync plugin:
<?xml version="1.0"?> <config> <!-- Server address and port --> <servername>$SERVERNAME</servername> <serverport>389</serverport> <!-- Authentication data --> <binddn>$BINDDN</binddn> <password>$PASSWORD</password> <!-- Anonymous bind --> <anonymous>0</anonymous> <!-- BaseDN for searching contacts --> <searchbase>$SEARCHBASE</searchbase> <!-- Filter for searching contacts --> <searchfilter>cn=*</searchfilter> <!-- BaseDN for storing contacts (using searchbase, if leaved blank) --> <storebase></storebase> <!-- Key attribute for identifying/storing contacts --> <keyattr>cn</keyattr> <!-- Search scope (base, one, sub) --> <scope>one</scope> <!-- Authentication mechanism --> <authmech>SIMPLE</authmech> <!-- Encrypted communication with LDAP server --> <encryption>0</encryption> <!-- Allow read/write contacts to/from LDAP --> <ldap_read>1</ldap_read> <ldap_write>1</ldap_write> </config>
The file plugin should be configured like this: (Just change $PATH to point to an existing writable directory on your computer)
<?xml version="1.0"?> <config> <!-- directory path for file-sync --> <path>$PATH</path> <!-- should care of subdirectories (TRUE or FALSE) --> <recursive>FALSE</recursive> </config>
You should have successfully dumped the contacts from the LDAP server into $PATH as individual vcards with filename as the cn of each contact. Congratulations! The next step is to couple this plugin with something more useful like an obex plugin and sync with your phone as described in this guide.
