[python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')

Tim Roberts timr at probo.com
Wed Sep 15 21:17:56 EDT 2021


Ruggero Paolo Basile wrote:
>
>
> Good morning i'am try to connect to remote host and get the eventlog 
> from windows , but in the
>
> module i can't find a value for authentication.
> Have you some news?
>
> this is my error "pywintypes.error: (5, 'OpenEventLogW', 'Access is 
> denied.')"


To do that operation, your username has to have permission on that 
remote machine.  Are you using a domain?  Are you logged in as a domain 
administrator?


This article talks about it, but since Windows security is a vast, dark, 
confusing, twisted mess, I'm not sure you'll be able to make it work.


https://docs.microsoft.com/en-us/archive/blogs/janelewis/giving-non-administrators-permission-to-read-event-logs-windows-2003-and-windows-2008


If you bring up the Event Viewer application ("eventvwr"), under Action, 
there's a "Connect to Another Computer" option.  Does that work for you?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3389 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mail.python.org/pipermail/python-win32/attachments/20210915/c6e427bc/attachment.bin>


More information about the python-win32 mailing list