I am unable to get the LDAP User module to create the associated LDAP entry when a user is created from the administrator's page.

Regardless of the settings in "BASIC PROVISIONING TO LDAP SETTINGS" I am unable to find a configuration that enables the option:

[ ]Create corresponding LDAP entry.

on the add user page. Note that under this option it states:

To enable this an LDAP server must be selected for provisioning to Drupal in admin/config/people/ldap/user and manual creation of LDAP accounts must be enabled also.

My initial thought here is that this is worded incorrectly considering this is from Drupal to LDAP. But perhaps I am not understanding something.

Either way, I included the following settings in "Basic Provisioning to Drupal Account Settings"

Drupal Account Provisioning Events
[ ]Create or Synch to Drupal user on successful authentication with LDAP credentials. (Requires LDAP Authentication module).
[X]Create or Synch to Drupal user anytime a Drupal user account is created or updated. Requires a server with binding method of "Service Account Bind" or "Anonymous Bind".
[X]Provide option on admin/people/create to create corresponding LDAP Entry.

With the same result.

Some debugging information:

When using the "Test LDAP User Configuration" with an unknown username I get the following message in the watchdog:
Some_Username : failed to find associated ldap entry for username in provision.

When using the "Test LDAP User Configuration" with an known username I get the following message in the watchdog:

ldap_search() call: base_dn: cn=Members,dc=example,dc=net, filter = (cn=Real User), attributes: , attrsonly = 0, sizelimit = 0, timelimit = 0, deref = , scope = 3

Which returns all the expected results of the user in the debugging window.

Regardless of "Execute Action" and "Actions/Event Handlers to Test " the only information I see in the watchdog and openldap server logs is regarding ldap_search(), nothing about account creation.

I have included a few attachments to help with the diagnoses( removed personal information).

Currently running 7.x-2.0-beta3+52-dev

My original comment can be found here:

http://drupal.org/node/1622942#comment-7162228

I am interested in the same configuration as this bug report, it seems we may be having similar problems.
http://drupal.org/node/1920682

Thanks!

CommentFileSizeAuthor
ldap_config.html_.txt11.55 KBocran
Server_Test_dname.txt1.95 KBocran

Comments

ocran’s picture

With a little bit of hacking I have got this up and running. I can now add a user to drupal which adds the corresponding inetOrgPerson and posixAccount on my ldap server.

After exhausting configuration options to gain the ability to select:

[ ]Create corresponding LDAP entry.

I broke down and just commented out this section of code in ldap_user.module

if (!$ldap_user_conf->provisionEnabled(LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY, LDAP_USER_DRUPAL_USER_PROV_ON_ALLOW_MANUAL_CREATE)) { 
    $ldap_fieldset['ldap_user_create_ldap_acct']['#disabled'] = TRUE;
    $ldap_fieldset['ldap_user_create_ldap_acct']['#description'] = t('To enable
      this an LDAP server must be selected for provisioning to Drupal in
      admin/config/people/ldap/user and manual creation of LDAP accounts
      must be enabled also!!');
  }

That allowed me send requests to the ldap server.

After applying ldap-string_only_tokens_discarded-1922906-7.patch from http://drupal.org/node/1922906 I am now able to create ldap accounts when I create drupal accounts.

Thanks!

johnbarclay’s picture

Title: Ldap User: Unable to create the associated LDAP Entry » Ldap User: Unable to configure ldap user checkbox.
johnbarclay’s picture

Status: Active » Fixed

This is fixed and committed (see http://drupalcode.org/project/ldap.git/commitdiff/7b4bfea6c35bbb6e144b40...). The basic problem was the option was in the wrong configuration array. I moved it into the "LDAP Entry Provisioning Events" where it belonged. Check it there and the options should be visible on the user. Thanks for pointing this out, I grouped it with some other configuration bugs related to ctools and lost track of it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.