OpenDS and SugarCRM Integration: A How to Guide
First things first - this blog builds on Trey Drake's blog. Second things second
- let's see how to integrate OpenDS with SugarCRM.
About OpenDS
OpenDS is a 100% pure Java, open source, directory server designed for large deployments. To know more about OpenDS visit its homepage.
For installation instructions download "Quick Setup" Web Start installer and read step-by-step instructions. As far as integration of OpenDS goes, the values of installation path, LDAP listener port, administrative User DN/password and the Directory Base DN, that you provide during installation are critically important.
About SugarCRM
Need introduction to SugarCRM? Sad and bad!! To begin with you can read SugarCRM on Wikipedia. Even before looking at the features of SugarCRM, just take a peek into their visionary thinking. (Source and reference: SugarCRM website)

You can start your SugarCRM capabilities tour here.
Integration with OpenDS
The problem that we are going to address in this section - How to use OpenDS for authenticating and provisioning Sugar users. Like most OpenDS and SugarCRM taks it's simple and straight forward.
- To start with, enable php-ldap module. Well, if that does not mean anything to you, it was intended to be that way. Open the php.ini file located in your php directory of the installation. Search for the line that says ";extension=php_ldap.dll" (Of course, .dll would be under windows, for UNIX it would be .so) and just remove the ';' at the beginning. The line would now be "extension=php_ldap.dll". Now restart the server. If you fail to do this step, you would get an error similar to the one shown below:
- Prepare and import your user data into OpenDS.
OpenDS can be started using the start-ds utility. The first thing you would want to do after starting OpenDS is to import data.
Now ldapmodify can be used to import this user into OpenDS. The example below shows the use of ldapmodify on Windows.
For importing large data sets into OpenDS, read the instructions here. In case the existing data is not in ldif format, makeldif tool should be used. To import data which is in ldif format, import-ldif tool can be used. The output of makeldif can be used with import-ldif to import data into server.
Alternately, ldapmodify can be used to import LDIF file. This is what we are going to do in this example. To add a user, the small LDIF file shown below is used.
dn: uid=praneet.tiwari,dc=example,dc=com
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
uid: praneet.tiwari
givenName: Praneet
sn: Tiwari
cn: Praneet Tiwari
mail: Praneet.Tiwari@sun.com
userPassword: password
C:\Program Files\openDs\bat>ldapmodify.bat -p 389 -a -D"cn=Directory Manager" -w tiger -f c:\add.ldif
Also, the ldapsearch utility can be used to search existing entries in the OpenDS server. - Login as admin. Goto Admin -> System Settings
- Go to LDAP authentication support and tick mark. The image below shows an example of entries that would work with data that was fed to OpenDS in item #2. Note that it's critically important to tick mark the Auto Create Users checkbox.
- That's all to it!!. New users already having entry in OpenDS can now start using SugarCRM.
- You may want to visit the SugarCRM page on OpenDS wiki.
References: http://sugarcrm.com, http://opends.org and other sources noted at places where they are used.
Great Post!
Thank you very much from Sydney Australia.
Jono
Posted by Jono on November 13, 2008 at 01:52 AM TPT #