Python System Administration

Tim Howarth tim at worthy.demon.co.uk
Sat Feb 2 09:52:44 EST 2002


In message <PLPSljAQX$W8Ewpx at jessikat.fsnet.co.uk>
          Robin Becker <robin at jessikat.fsnet.co.uk> wrote:

> In article <37d27e024b.tim at worthy.demon.co.uk>, Tim Howarth
> <tim at worthy.demon.co.uk> writes
> >In message <6vTfsIAio7W8EwNp at jessikat.fsnet.co.uk>
> >          Robin Becker <robin at jessikat.fsnet.co.uk> wrote:
> >
> >> well if I could get the win32com extensions to change passwords on
> >> different machines for me I would really like that
> >
> >Why win32com rather than win32net (where it's easy)?
> >
> well I assumed we have to do it through DCOM,

You need to use com to attack the clever new features in Active
Directory Win2k+ but plain NT account info win32net is simple.

Best is to download the samples for the win32all package

(not sure, can't remember URL, I have file as - PythonWin32_samples.zip)

or buy Mark Hammonds Python on Win32 book,

or use the help with win32allxxx (and win32api help)


> but if it's easy with win32net what's the easy way?

import win32net

userinfo=win32net.NetUserGetInfo('','tim',2)
userinfo['password']='secret'
win32net.NetUserSetInfo('','tim',2,userinfo)


'' is server name, in this case server it is run on (no need for name)
2 is data level - what to get/set


-- 
___
 |im    ---- ARM Powered ----



More information about the Python-list mailing list