Discussion Locked

Auto-create users from MS-Access

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm looking for an elegant way to get new users imported into Windows 2000 Advanced Server's Active Directory from MS-Access 2000. Ideally, the process should be initiated by clicking on an executable desktop icon.

CSVDE.EXE isn't exactly what Iam looking for, though.

The MS-Access table contains four relevant fields among others: firstname, lastname, password and add. The add field contains either a Yes or No. Yes means, "go ahead" and create the new user.

The new user name in Active Directory uses one letter from the firstname field and the full lastname field. Password is "password", as default.

As an example, for Jack Smith, the firstname field will contain "Jack" and the lastname field will contain "Smith". This processshould automatically create a new user in Active Directory as "jsmith" with "password" as the log-on password.

I'd appreciate your help. Url links, articles, direct instructions, etc., are all welcome.

Many thanks.

7 replies

by timthetoolman

Does it need to be through MS-Access?

If you can program at all, then C# has the capability to directly add and modify Active directory entries. I was just reading about it today!

You could write a simple program to do it with not very much effort. There may even be an example on the net of "active directory manipulation" that you could base it on.

If you're interested in a solution like this, I'll point you at some code...

Cheers,
Tim.

by kyu

Thanks for your feedback. I am aware of the C++ path but data in Access table is also automatically created through another process. Therefore, MS-Access must be used.

Cheers

by sl-campbell

How about in conjunction with the CSVDE.EXE?

Maybe by creating the text file, (MS Kb Q300409 gives the outline), needed, in an Access module by getting the data from the table in Access and then calling CSVDE.EXE with the required parameters.
'=================

At:

http://www.activewin.com/win2000/step_by_step/active_directory/bulksteps.shtml

there is VBScript code, (about half way down), that can be used with Access, or converted to be used in a module. Also, if you use the same logic, you can create the functions needed in a module, combining the parameters from the Access table with file.

The only problem is then having an EXE to start instead of a Databank. It is possible to automate everything, with a start form and start button, using an Access databank, when a user first clicks on the MDB file. However, a actual VB program might be the best, and fastest way of doing this.

Post a comment to your question if you do not understand this or need more help!

by kyu

Thanks for your feedback. I actually have a printout of Q300409. Looks like I might have to write some VB code to get what I want. Nevertheless, I'd like to know if others at TR might have a better way.

by sl-campbell

So wasn't the questioned answered? Even though you had the article but didn't mention it? Didn't you did say:

"Url links, articles, direct instructions, etc., are all welcome."

But I guess not. Or does the complete code need to be written?

Do others who post an answer have to think that their question will be rejected because someone else might come up with another way , again? How long could this go on? I would be careful in doing this when asking for help in this form, unless the answer actually does not pertain to the question, or doesn't solve the problem, or doesn't lead to the right direction in solving the problem, unless it was clear in the question that you had already found or tried a certain way, (such as the MS Kb article), but were looking for a different one.

Better, for a question like this, asking for any help and welcoming all contructive help to the actual subject, would be to either let all answers that met the criteria remain open until a reasonable amount of time has passed and then rate them, or to accept all answers that met the criteria, the criteria being:
Active Directory update using criteria from an Access table; not using only CSVDE.EXE; Already have articles Q123456, but looking for another way; any Url links, articles, direct instructions, etc., are all welcome.

Ok, sorry, I just didn't understand, because things like this happen often.

by kyu

Hi

You wrote:
Ok, sorry, I just didn't understand, because things like this happen often.

Me :-)
Actually, I was very impressed by your feedback, especially when you managed to zero-in on the same Q-article that I had printed out before posting this question.

I readily admit to any mistakes I make. Please accept my points for your effort, and many thanks.

Season's greetings to you.

Kyu Rhee

This discussion is closed to new replies.