I need to query a bunch of Windows machines' local clocks from a Linux host. Those machines are not synchronized to anything for reasons that are outside of my control. Currently I use a call to "net time" using Python's subprocess module; however, for one machine the query fails with the error "Protocol negotiation failed: ERRDOS:ERRnomem." On another Linux host with a newer version of Samba this machine pools fine, but others (and more of them) fail with different errors, which is currently the reason I'm not migrating to the newer server (RHEL7 to RHEL8). So I don't think the error is with the remote Windows machine but with the Samba implementation.
Now before I download and build the Samba sources and try to find out what's going on here I thought I try to use pysmb. However, this seems to exclusively deal with file sharing, or did I just not look at the right spot?
People will now start telling me that I wouldn't have this problem if the Windows hosts just properly synced themselves with a time server, and they'd be right. However, I gave up that fight a long time ago. I have no administrative authority over the Windows machines. Each of them runs an industrial production equipment worth millions, 24h/7d, and nobody ever touches the software (for good reasons).
The one host that currently doesn't respond to time queries used to do so for years and one day just stopped.