Author Topic: 3.5.1 bulk import users  (Read 2008 times)

dave2318

  • Zen Apprentice
  • *
  • Posts: 48
  • Karma: +3/-0
    • View Profile
3.5.1 bulk import users
« on: July 08, 2014, 10:03:11 am »
Hi All. On 3.4 i used the script on this page http://doc.zentyal.org/en/appendix-c.html to bulk import users from CSV file.
I have since upgraded to 3.5 and 3.5.1 and have adjusted every occurrence of EBox::Users::User to EBox::Samba::User but i now have a problem. when i run the script i get the following error message:-

LDAP error: The request contained an invalid DN
.<br/> Operation parameters:{
  'base' => 'CN=,CN=Users,DC=mycohens,DC=net',
  'filter' => '(objectclass=*)',
  'scope' => 'base',
  'attrs' => [
               '*',
               'objectGUID',
               'unicodePwd',
               'supplementalCredentials'
             ]
}

Kind of indicates to me that the procedure defaultContainer() is returning a bad base DN with an extra "CN=," at the beginning.

Anyone any ideas?

Dave

dave2318

  • Zen Apprentice
  • *
  • Posts: 48
  • Karma: +3/-0
    • View Profile
Re: 3.5.1 bulk import users
« Reply #1 on: July 10, 2014, 04:35:13 pm »
none?

basically we need the script at http://doc.zentyal.org/en/appendix-c.html to be updated for 3.5

koenraad

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3.5.1 bulk import users
« Reply #2 on: July 10, 2014, 04:41:21 pm »
Hi,

I'm trying to do the same, but I get :

Missing argument: samAccountName

dave2318

  • Zen Apprentice
  • *
  • Posts: 48
  • Karma: +3/-0
    • View Profile
Re: 3.5.1 bulk import users
« Reply #3 on: July 10, 2014, 04:43:13 pm »
I had to change the line
uid => $username,
to
samAccountName => $username,

to get around that problem :)

koenraad

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3.5.1 bulk import users
« Reply #4 on: July 10, 2014, 04:56:35 pm »
Yep,

Now I'm getting the same error.

dave2318

  • Zen Apprentice
  • *
  • Posts: 48
  • Karma: +3/-0
    • View Profile
Re: 3.5.1 bulk import users
« Reply #5 on: July 10, 2014, 05:01:12 pm »
at least it's not just me :)
i have another script that uses samba to import users and create openchange accounts thanks to stuartnaylor on this post:-
https://forum.zentyal.org/index.php/topic,22477.0.html
but i have also modded this script to import contacts and would like to get this one working
It seems to be something to do with the function defaultContainer() in the perl users module not working right, but i don't know perl enough to guarantee that:(