New module: LDAP Contact Manager

Events happening in the community are now at Drupal community events on www.drupal.org.
-redShadow-'s picture

I just added to drupal.org project this project I am working on:
http://drupal.org/project/ldapcm

It connects to a LDAP directory using the Net_LDAP2 PEAR module, and performs searches on that directory.
It will also provide the ability of create/edit entries, and support custom schema/fields.

Comments

how to configure ldap conact manager in drupal

kha_206's picture

Hi after enabling ldap conact manager
i am getting following error

"PEAR Net_LDAP2 module not found. Cannot connect to LDAP.
To install it (on Debian), just run: apt-get install php5-pear && pear install Net_LDAP2.
You can also manually download the code and place the 'Net' directory somewhere in the PHP inclusion path. (Currently using LDAP AddressBook: PEAR::Net_LDAP2 module N/A)"

can u please help

You need PEAR

-redShadow-'s picture

Hi, as the error says, you need the PEAR framework, plus the Net_LDAP2 package.
Usually, you could install that from your package manager, eg. on Debian, run as user root:

apt-get install php5-pear
pear install Net_LDAP2

If you are not running linux, or don't have the root access, or just don't want to install system-wide pear, the quickest way to get ready is to download PEAR and Net_LDAP2 tarballs and untar them in the ldapcm folder.

Download links:
Pear - Tarball here
Net_LDAP2 - Tarball here

Then, just make sure that the file tree looks like:

sites/all/modules/ldapcm
|--  ldapab.module
|--  ldapab.info
|--  ...
|--  PEAR.php
`--  Net
      `-- LDAP2.php

Hope that's clear. I think I will add a part on the PEAR/Net_LDAP2 installation on the project page (it seems to be not so clear to those who don't know PEAR)..

kha_206's picture

Hi

i completed configuration ,i am unable to add conatcts to ldap conatct manager

can u plz help regarding ,i have added and enabled ldap_integration ,ldapcm modules ,is any other module need to add to get fulll UI for Ldap contact manager

Best Regards
Khaleel

Use Case

coderintherye's picture

I'm eagerly awaiting your response to the issues I brought up http://groups.drupal.org/user/29053 not sure if you saw them. The main point is, why should someone use your module, which uses an external requirement from PEAR, and also is much for nascent and thus not as high quality as the existing LDAP modules? Why not just add yours into that module group, let those modules handle the authentication steps and such, and you just handle the Contacts Manager aspect. That is how modules should be, do one thing, and do it well.

Drupal evangelist.
www.CoderintheRye.com

I agree with you with the

-redShadow-'s picture

I agree with you with the "avoid duplicates" thing. The final goal of the module I'm developing is completely different from what ldap_integration and other ldap-related modules do.
It should be considered quite as a "general purpose ldap connector tool", with the addressbook management stuff, but not only.

I choose PEAR Net_LDAP2 class as LDAP connector since I prefer using something that is already developed by others and probably have more testing than the built-in class used by other ldap modules. Furthermore, I choose to not use the ldap_integration configured connections to avoid adding an unneeded dependency.
I'm planning to talk with developers of other modules to think something like a common "LDAP abstraction layer", with standard connections configuration, connector backend, etc. to be used by any module that needs to connect to LDAP.

I'm sorry, you are going to

coderintherye's picture

I'm sorry, you are going to have to explain this better, because a lot of what you say doesn't make any sense.

You say what you are doing is completely different, and then you say it is a general purpose LDAP connector tool. That is what LDAP integration is.

You say you are adding PEAR Net_LDAP2 class, which is an unneeded depency, since you prefer it, and then 1 sentence later you say you are not using ldap_integration because it is an unneeded dependency. That strategy makes no sense unless you can come up with some factual arguments as to why the PEAR Net_LDAP2 class is better.

By the way, I think it is great you are approaching this problem, but it's going to save everyone a lot of headache if you try to architect the best solution first and avoid recoding the wheel as much as possible. Have you even looked at http://drupal.org/project/ldap_addressbook ? Why not update that module to be current instead of rewriting the same thing from scratch. That takes care of the addressbook piece and would keep your module more of an abstraction layer.

Have you considered filing patches against LDAP integration to make it available as a more general abstraction? If not how about filing some feature requests to figure out if what you want to do could become an abstraction layer for LDAP integration. Although, I can guarantee that a module that requires an external download is going to be less used than a module which is self-contained on drupal.org

Drupal evangelist.
www.CoderintheRye.com

LDAP Modules

coderintherye's picture

Could you add a brief overview here or on your module page as to what the differences and similarities are between your module and the current group of LDAP modules http://drupal.org/project/ldap_integration

It would seem like your module wold do better to integrate with the current ones that already do the backend work, and thus your module could focus on the actual managing of the contacts, as the name implies. As it stands, their integration is 100% better because it doesn't require a PEAR package to run, so not sure why you are reinventing the wheel. That said, the contact manager part itself looks like it could be a good addition.

Drupal evangelist.
www.CoderintheRye.com

I have to agree

verta's picture

It took me some time to get PEAR up, although I don't want to add steps and code just for this one function. Then I configured the connection to LPAP, which works differently from the current group of LDAP modules http://drupal.org/project/ldap_integration
- plus I have not yet gotten this module to work.

The only thing I've figured out how to add to the site was the search block, and it is failing with an error. I might log this in as an issue, but since it looks like this module is storing passwords in clear text, http://drupal.org/node/702236 so I'm going to have to uninstall it in order to comply with our company policies.

Question about SSO and LDAP

pcave's picture

I have a client who is currently using the LDAP authentication module to authenticate users logging into their site. They want to know if it is possible to automatically log users in if they've previously authenticated against LDAP. Basically they don't want the users to have to re-key their username and password to log into the Drupal site.

Is this something that can be done?

Thanks,
Phillip

You might try webserver_auth?

verta's picture

http://drupal.org/project/webserver_auth

According to docs, you can set up Apache's LDAP to do the authentication.

Haven't tried this, myself.

SSO is possible with the

kswan's picture

SSO is possible with the Webserver Auth (http://drupal.org/project/webserver_auth) module, but it isn't easy.

Basically, you will need to configure your webserver to handle the authentication (using ntlm or kerberos), then Drupal will trust the authentication by the webserver.

Also, from my experience the webserver_auth and ldap_integration modules don't work well together.

LDAP integration development and modules

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: