Could python help to create hundreds of NT accounts ?

Larry Bates lbates at
Wed Jun 2 22:52:37 CEST 2004

I needed to do something like this but with a little
twist.  Client wanted to put user information in a
database and have servers add users to the domain
on the fly.

I wrote an NT service that:

1) Wakes up, scans database for new or changed users
2) Adds new users, removes deleted users, disables
   users that are marked as disabled
3) Changes rights, password, etc. for changed users
4) Put some information in comment field that is used
   by an application on the server.
5) Updates WTS information for this user to have a
   default program run upon login.
6) Goes back to sleep.

I installed this on several servers and when I add
user to DB it appears in a few minutes on all servers.
Seems to work fine.  I used Mark Hammond's Python
Programming on Win32 quite extensively, but it took
several weeks to track everything I needed down.
If you are interested, we could discuss a short
term consulting agreement to address your specific

FYI, Larry

"google account" <mynews44 at> wrote in message
news:e84f5d12.0406011439.57ec785f at
> Not really being a programmer, but thinking that there must be a
> better way than to do it by hand and havign a friend who likes to tell
> me that python is the answer to everything I am hoping.
> I have two NT4 domains, and I need to create instances of all the
> account names from one in the other.
> All accounts need to have identical group memberships to each other,
> and different passwords.
> I have in mind some program that will automatically generate a
> password (I already wrote one of those) and write out to a csv file
> username,passwd thgat we can refer to when the clients need to log
> into their new account.
> Because there are about 1600 accounts,  I'd really love it if there
> was a way to do this with a script.
> I bought the Dietel How to Program Python book in an attempt to learn
> this language,  but it doesn't seem to have much in it related to NT
> stuff like this.
> IF anyone has done anything like this,  or knows how,  I'd love to
> hear from you.
> Cha!
> nemir (at) hot mail dot com

More information about the Python-list mailing list