[Tutor] Python and Active directory

John M. Purser jmpurser at comcast.net
Tue Mar 30 06:59:10 EST 2004


You might want to take a look at the windows help file for "Command
Reference".  Specifically the "Net User" command and "Net Group".  Have your
python script attach to the output of these commands and work with the
string it creates.  There's also the windows scripting host, about which I
know very little, but which may offer much more functionality than these
command.com options.

For permissions, assuming we're talking windows look at the Cacls command
which "Displays or modifies access control lists (ACLs) of files."

On Unix you can do the same thing with ls -al and parse the result.

John Purser

-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org]On
Behalf Of R. Alan Monroe
Sent: Tuesday, March 30, 2004 4:48 AM
To: tutor-bounces at python.org; Wilhelmsen Jan
Cc: tutor at python.org
Subject: Re: [Tutor] Python and Active directory


> Is there any module or other ways of extracting/listing/modifying
> users/person account  information from Active directory?

> If there is? Where can I find information about this?

> I need to make a script that exports all users in all OU's to a formatted
> textfile.

While we're at it, I could really use one that listed all folders on a
server and which users have been given rights to each of them. How
similar would that be to the first request, above?

Alan


_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor





More information about the Tutor mailing list