Im trying to create a simple AD-Management program which for example adds users, delete users etc for an Azure VM. This is my Code currently:
from pyad import aduser
aduser.set_defaults(ldap_server='the.domain', username='username', password='password', ldap_port=389)
user = aduser.ADUser.from_cn("myuser")
We have a public IP aswell as a local domain, which our program of course cant connect to through the local domain, as we are using our own PCs, not a client of the VM.
Of course the program is supposed to be run on a client of the VM later, but I was wondering whether it would be possible to connect externally through the public IP aswell.
Is this possible? The pyad documentation doesnt seem to be the most extensive, and simply entering the public IP instead of the domain in ldap_server does not seem to work.
It throws the error:
Exception: Unable to detect default domain. Must specify search base.
From documentation try: