Welcome, Guest
Username: Password: Remember me
Archived CloudStack Forums for reference purposes please direct all future inquiries to the Apache CloudStack mailing lists.

incubator.apache.org/cloudstack/mailing-lists.html

TOPIC: [script] sync users between Cloudstack and Active Directory

[script] sync users between Cloudstack and Active Directory 1 year 7 months ago #9521

  • Essential
  • Essential's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 29
  • Thank you received: 8
  • Karma: 1
Hi all. Script written at Ruby. With this script you can:
- Sync your users from AD => Cloudstack 
- Configure you Cloudstack to use ldap auth

Tested with
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
gem list:
json (1.6.5)
net-ldap (0.2.2) !!!!!! pls use this version. !!!!!!

Use net-ldap 0.2.2

Before you can start use this script you must put some information
@ldapconfig = {
  "dc_ip" => "", #IP address your domain controller
  "filter_ldap_search" => "*",  #mask for ldap filter * => fetch all users
  "searchbase" => "", # where we must search users?
  "ldap_port" => "389",  #port to ldap
  "queryfilter" => "(&(mail=%e))", #cloudstack will compare email from AD and from cloudstack DB. Find more info at KB about ldap
  "binddn" => "", #user for ldap connection
  "bindpass" => "" #password for ldap user
}
@cloud_config = {
    "cloud_url" => "", #url for cloudstack management
    "apiKey" => "", #apiKey
    "secretKey" => "", #secretKey
    "test_case" => false,
    "domainid" => "" # This is domain ID where all our users will be created... You must create domain manual under ROOT domain and put domain ID.
}
Usage:
  -s, --sync    Start script at sync mode. Script will sync users between ldap and cloudstack
  -t, --test    Start script at test mode. Script will only test some configuration
  -c, --conf    Start script at ldap configuration mode. Script will config you cloudstack for ldap auth..
  -h, --help    Show this help

Download:

File Attachment:

File Name: ldap_sync.zip
File Size: 3 KB
Last Edit: 1 year 7 months ago by Essential.
The administrator has disabled public write access.
The following user(s) said Thank You: ke4qqq, jamesbjackson, ACJ, mortiz, didiert

Re: [script] sync users between Cloudstack and Active Directory 1 year 7 months ago #9608

  • ke4qqq
  • ke4qqq's Avatar
  • OFFLINE
  • Administrator
  • Posts: 620
  • Thank you received: 69
  • Karma: 22
Wow - this is great stuff - can you tell me how this is licensed??

Is this code hosted on github or elsewhere?
The administrator has disabled public write access.

Re: [script] sync users between Cloudstack and Active Directory 1 year 7 months ago #9633

  • Essential
  • Essential's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 29
  • Thank you received: 8
  • Karma: 1
ke4qqq wrote:
Wow - this is great stuff - can you tell me how this is licensed??

Is this code hosted on github or elsewhere?

i dont think about license. i think any people can use this script.


i only have this script at my local PC. I can create some git repo if this is need.
The administrator has disabled public write access.
Time to create page: 0.289 seconds

Open@Citrix

Citrix supports the open source community via developer support and evangeslism. We have a number of developers and evangelists that participate actively in the open source community in Apache Cloudstack, OpenDaylight, Xen Project and XenServer. We also conduct educational activities via the Build A Cloud events held all over the world. 

Connect