How would I go about doing this in python? I have several machines on a network and given the name/IP of one I need to find which user is logged in. All machines are windows except the machine that is running the script which is Linux. Is there a way to do this with active directory?