[python-win32] Re: Is there a Python win32 RunAs equivalent where youcan send a password?

Paul Moore pf_moore at yahoo.co.uk
Mon Mar 15 17:52:10 EST 2004


"R. Alan Monroe" <amonroe at columbus.rr.com> writes:

>> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81402/index_txt
>
> This looks really promising, but I've got some kind of rights problem:
>
>>>> a = impersonate.Impersonate('somebody', 'xxxxxx')
>>>> a.logon()
> pywintypes.error: (1314, 'LogonUser', 'A required privilege is not held by the client.')

Look at the comments in the recipe - the full text is at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81402/

Basically, you need special rights to do this "Act as part of the
Operating System" is the key bit. The "RunAs" command gets round this
by using a service as an intermediary. The "RunAs" service handles the
job of running as a different user - it runs as the SYSTEM user, which
has most rights on by default.

Hope this helps,
Paul
-- 
This signature intentionally left blank




More information about the Python-win32 mailing list