Changing User on NT

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Mon Feb 10 16:34:12 EST 2003


Robert_J_Roberts at RL.gov wrote:

>I have approximately 60 computers spread across a single network in multiple
>locations.
>
>I would like to access the file system on all of the computers.
>
>The different locations use different login userid/password combinations for
>Admin.
>
>I have all of those userid/password combinations and can run code against
>them as long as I log in as that same userid/password.
>
>Is there a module in python for changing my userid/password as I go so I can
>access all of the machines without having to change my login on the box from
>which I am running my python code?
>
>All of the computers are running on Windows 2000 across an NT network.
>
>I can use any version of python I need to.
>

You're not too clear on what you want to achieve but if you just need
to access the files on the PC, wouldn't this do it?

net use x: \\<pc>\c$ <password> /user:<domain>\<userid>

Wrap it up in an os.popen() command and you can script the whole
thing, I would have thought.

--
Dale Strickland-Clark
Riverhall Systems Ltd




More information about the Python-list mailing list