+ Post New Thread
Results 1 to 9 of 9
Windows Thread, Update Active Directory with mySQL table data? in Technical; Does anyone know of a way to update Active Directory user information (name, username, password) with data from a mySQL ...
  1. #1

    Join Date
    Dec 2006
    Location
    US
    Posts
    300
    Thank Post
    64
    Thanked 17 Times in 16 Posts
    Rep Power
    18

    Update Active Directory with mySQL table data?

    Does anyone know of a way to update Active Directory user information (name, username, password) with data from a mySQL table?

    My future goal is to have Active Directory automatically synchronize with mySQL (which is located on a remote server) once per day, during the night. I hope to set it up so that if the user exists in mySQL but not in Active Directory, it will add the user to Active Directory. If the user already exists, it will update the fields in Active Directory with the data from mySQL.

    Are there any free scripts that do this? If not, does anyone have any tips on how to start writing a script like this?

    Thanks.

  2. #2

    GrumbleDook's Avatar
    Join Date
    Jul 2005
    Location
    Gosport, Hampshire
    Posts
    9,939
    Thank Post
    1,343
    Thanked 1,787 Times in 1,110 Posts
    Blog Entries
    19
    Rep Power
    595

    Re: Update Active Directory with mySQL table data?

    I would suggest looking at ADSI Scripting by Thomas Eck, or several of his articles that are now on WindowsITPro (formerly WinScriptingSolutions).

  3. #3

    Join Date
    Jul 2007
    Location
    Nottingham
    Posts
    196
    Thank Post
    19
    Thanked 7 Times in 7 Posts
    Rep Power
    16

    Re: Update Active Directory with mySQL table data?

    I currently use PHP/LDAP for modifying some aspects of the user accounts in the active directory. This would allow for the modification of items such as the password, forename, surname, homefolder, etc. I've not tried creating a user from scratch in PHP or modifying an accounts username though.

    Depends if you want to have a front end to it for reporting and giving it more expansion potential.

  4. #4

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835

    Re: Update Active Directory with mySQL table data?

    May I ask why you'd want to do this via mySQL? An LDAP server would be more appropriate...

  5. #5
    limbo's Avatar
    Join Date
    Aug 2005
    Location
    Birmingham
    Posts
    460
    Thank Post
    2
    Thanked 41 Times in 36 Posts
    Rep Power
    25

    Re: Update Active Directory with mySQL table data?

    Quote Originally Posted by claridentech
    I hope to set it up so that if the user exists in mySQL but not in Active Directory, it will add the user to Active Directory.
    We already do this - using a VB app to connect to the two different databases and then it is a question of comparing and adding / updating records where appropriate.

    In reality we use connect to three different databases to do this - one is the Active Directory, one is out CMIS SQL server and the third is an MSAccess dbase that registers the student CMIS ID to their Active Directory username.

    This means that new students / staff put into the CMIS database get a username created overnight which is then emailed to their form tutor (and with 1800 students you can guess how much work that saves us - especailly during the summer!)

    I am guessing this is the kind of thing you are trying to achieve?

  6. #6

    Join Date
    Dec 2006
    Location
    US
    Posts
    300
    Thank Post
    64
    Thanked 17 Times in 16 Posts
    Rep Power
    18

    Re: Update Active Directory with mySQL table data?

    Thanks for all the help so far.

    I am not really needing a front end or any reporting tools for this system.

    I am wanting to use mySQL because I am wanting to copy the user data from our online portal system to Active Directory. This online portal system runs on mySQL. I know LDAP would be better, but I'm still hoping this will work.

    Limbo, that system sounds almost exactly like what I was thinking of. It sounds amazing! I'm sure the automated system does save a lot of time during the summer.
    Is there any chance you might be able to email me some code samples from this VB app? I am just getting started with VB...

  7. #7
    limbo's Avatar
    Join Date
    Aug 2005
    Location
    Birmingham
    Posts
    460
    Thank Post
    2
    Thanked 41 Times in 36 Posts
    Rep Power
    25

    Re: Update Active Directory with mySQL table data?

    Quote Originally Posted by claridentech
    Is there any chance you might be able to email me some code samples from this VB app? I am just getting started with VB...
    Not in school this week to get my hands on the code (Term time holidays are a wonderful thing!) - drop me a PM as a reminder next week and I will see what I can dig out to get give you a hand.

  8. #8

    Join Date
    Dec 2006
    Location
    US
    Posts
    300
    Thank Post
    64
    Thanked 17 Times in 16 Posts
    Rep Power
    18

    Re: Update Active Directory with mySQL table data?

    Thanks, limbo. That would be great.
    I will send you a PM next week.

  9. #9

    Join Date
    May 2006
    Posts
    159
    Thank Post
    5
    Thanked 10 Times in 5 Posts
    Rep Power
    18

    Re: Update Active Directory with mySQL table data?

    If you go to:
    http://dev.mysql.com/downloads/connector/

    You can download, then install the ODBC connector which will then let you connect from VBS/VB/VBA etc.

    We use this to link our excel assessment application to our mysql behaviour database.

SHARE:
+ Post New Thread

Similar Threads

  1. back up and restore mysql data (joomla-ravenswood)
    By Uraken in forum Web Development
    Replies: 4
    Last Post: 28th November 2007, 10:35 PM
  2. Active Directory Explorer
    By ajbritton in forum Windows
    Replies: 6
    Last Post: 15th November 2007, 10:37 PM
  3. PDA and Active Directory
    By localzuk in forum Windows
    Replies: 4
    Last Post: 10th October 2007, 03:54 PM
  4. Replies: 3
    Last Post: 16th November 2006, 09:55 PM
  5. Importing data to Active Directory
    By fooby in forum Wireless Networks
    Replies: 3
    Last Post: 16th February 2006, 05:08 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •