[python-win32] Impersonating an Admin User using a standard User

Tim Golden mail at timgolden.me.uk
Mon Apr 30 09:57:52 CEST 2007


Amit Arora wrote:
> Hi Members,
> 
> I am trying to use the Admin Privilidges of a user , by logging into the
> system using a standard user......
> Am using the following code for impersonation ......... Also aware of
> CreateProcessAsUser , guess I am not able to figure out the correct way
> to handle the admin user to do some admin task using a standard login
> .....

Well you don't actually say what doesn't work. One point
is that you *might* need to grant your user the
"Act as part of the Operating System" privilege:

   http://tinyurl.com/2s5wfq (MSDN reference)

but you're code's come out rather unformatted in my email
reader so I can't try it out without a fair bit of
rework.

TJG


More information about the Python-win32 mailing list