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)


Right on!! SugarCRM provides clients with options of on-demand solution  as well as on-premise solutions. That's not all.  There are two on-premise, behind-firewall solutions - SugarCube and Sugar On-Site allowing the clients to deploy CRM solutions differently depending on their IT capabilities and organizational strengths. As a short digression, I would like to point out that a silent cold war has been raging in the CRM space. The on-demand solutions have been the buzzword for a while. But, many organizations may be left wondering whether customer-assets should lie with a third-party. Whereas, the small and medium sector may have little choice, these companies have to take a decision when their fight for survival is over. SugarCRM is well placed to take advantage of this situation. The flexibility of solutions provided may be a major attraction. Last, but not the least, nobody is doubting the value of on-demand solutions. See this blog on successforce community.

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.

  1. 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:
    LDAP Error

  2. 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.

    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

    Now ldapmodify can be used to import this user into OpenDS. The example below shows the use of ldapmodify on Windows.

    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.

  3. Login as admin. Goto Admin -> System Settings


  4. 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.



  5. That's all to it!!.  New users already having entry in OpenDS can now start using SugarCRM.



  6. 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.

 



Comments:

Great Post!

Thank you very much from Sydney Australia.

Jono

Posted by Jono on November 13, 2008 at 01:52 AM TPT #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by praneet