Posted by eft on August 27, 2009 at 3:40pm
Jump to:
| Project: | LDAP provisioning |
| Version: | 6.x-1.0-beta1 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Am I missing a dependency or something - I cannot see where to import users?
Comments
#1
Expand the "Upload accounts" fieldset at the bottom of 'admin/user/accounts' page.
#2
I don't see it there - do I have to configure something under admin/settings/ldap/ldapprov ?
Also, I only want to create accounts in the Drupal db for which LDAP accounts already exist. I don't want the provisioning module to create accounts on the LDAP server.
Thanks
#3
ok - I see - I had to enable the LDAP user provisioning at admin/settings/ldap/ldapprov
however, it looks like this module is specifically for creating LDAP accounts - maybe I should be looking at another method/module for bulk creation of Drupal users (matching existing LDAP accounts).
#4
Also interested in if we can get a one way bulk import of users from the LDAP Server.
In our use case, the LDAP server is actually going to be an adaptor bridge between a custom Perl script and Drupal for one way flow of data from Perl file system database to Drupal. The Perl API runs from a custom file system based storage of sterilized objects that is already integrated into LDAP, so this is looking like the easiest approach.
#5
The accounts from the csv file are created in LDAP and cannot be used to create stand alone drupal users.
#6
Thanks Miglius.
While this response is limited to the server limit, the following gives a start to the listing:
<?php
function acrrm_ldap_all_users() {
global $_ldapauth_ldap;
if (!$_ldapauth_ldap)
return;
// If there is no bindn and bindpw - the connect will be an anonymous connect.
$_ldapauth_ldap->connect($_ldapauth_ldap->getOption('binddn'), $_ldapauth_ldap->getOption('bindpw'));
foreach (explode("\r\n", $_ldapauth_ldap->getOption('basedn')) as $base_dn) {
if ($base_dn) {
$name_attr = $_ldapauth_ldap->getOption('user_attr') ? $_ldapauth_ldap->getOption('user_attr') : LDAPAUTH_DEFAULT_USER_ATTR;
$filter = "($name_attr=*)";
$result = $_ldapauth_ldap->search($base_dn, $filter);
if ($result && $result['count'] >= 1) {
unset($result['count']);
return $result;
}
}
}
return array();
}
?>
#7
I am looking to upload the accounts from AD into Drupal without the user having to log in.
It does look like this module will creating LDAP accounts on the server. I don't want to do that I want to take all of the accounts on the LDAP server and create accounts in Drupal.
How do I do this?
#8
I thought that defeats the purpose of this module? My understanding and hope for implementing is that the Drupal users table is irrelevant and authentication occurs via the LDAP users on a whole other server, whether on the LAN or not. Correct?
#9
@tchronister. The drupal user table (and the drupal uid) is still needed to identify the author of nodes, to allow people to have a profile page, etc.
The password field is less relevant as authentication is done against ldap. (however, i think when ldap is not available and the drupal password matches the provided password, drupal might still log the user in. not 100% sure though, you'd have to try)
#10
Hi
does the bulk user creation works for you ? on LDAP of course.