tim golden cggctimgoldenmeuk giampaolo rodola wrote roger upole wrote think youre looking win32securityimpersonateanonymoustoken note anonymous thing guest account reading msdn seems used threads im asynchronous environment im even sure thats need could provide example code well youve still got thread even youre spawning handle multithreading hopefully code illustrates whats going obviously youll adapt circumstances tjg import win32api import win32security import ntsecuritycon anonymous_sid win32securitycreatewellknownsid win32securitywinanonymoussid __name__ __main__ flags ntsecurityconmaximum_allowed start thread probably doesnt token unless impersonating already try htoken win32securityopenthreadtoken win32apigetcurrentthread flags true except win32securityerror errno errcontext errmsg errno 1008 htoken win32securityopenprocesstoken win32apigetcurrentprocess flags else raise show indicate owns token impersonation sid attr win32securitygettokeninformation htoken win32securitytokenuser print token sid impersonate anonymous user show resulting token owner anonymous sid win32securityimpersonateanonymoustoken win32apigetcurrentthread htoken win32securityopenthreadtoken win32apigetcurrentthread flags true sid attr win32securitygettokeninformation htoken win32securitytokenuser sid anonymous_sid print token anonymous sid else print token sid _______________________________________________ pythonwin32 mailing list kpitckaew45pythonorg httpmailpythonorgmailmanlistinfopythonwin32 thu 07 aug 2008 022718 0000 pythonwin32 using logonuser guest account