Python System Administration

Robin Becker robin at jessikat.fsnet.co.uk
Sat Feb 2 21:31:05 EST 2002


In article <ClZxOKANQBX8Ewis at jessikat.fsnet.co.uk>, Robin Becker <robin at jessikat.fsnet.co.uk>
writes
>In article <ac5588024b.tim at worthy.demon.co.uk>, Tim Howarth
><tim at worthy.demon.co.uk> writes
>.....
>>> 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
>....
....
looking at win32net I see

win32net.NetUserChangePassword( server , username , oldPassword , newPassword )

which should do exactly what I want.
-- 
Robin Becker



More information about the Python-list mailing list