When trying user = pyad.aduser.ADUser.from_cn("username")
I get :
Traceback (most recent call last):\Outils\GIT\ga-werd-traitement_habilitations\python> File ".\werd-run.py", line 13, in <module> user = pyad.aduser.ADUser.from_cn("username") File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adobject.py", line 135, in from_cn return cls(adsearch.by_cn(cn, search_base, options), None, options) File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adsearch.py", line 17, in by_cn type="GC") File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adquery.py", line 78, in execute_query self.__rs, self.__rc = command.Execute() File "<COMObject ADODB.Command>", line 3, in Execute File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\win32com\client\dynamic.py", line 287, in _ApplyTypes_ result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args) pywintypes.com_error: (-2147352567, 'Une exception s’est produite.', (0, 'Active Directory', 'Une erreur d’opération s’est produite.\r\n', None, 0, -2147217865), None)
To translate from french "an operation error has occured" is not really helpful.
I tried ADuser from cn on my rootDSE, it works.
I tried several combinations (username with or without domain?) but no luck. Is there a way to diagnose what's wrong on the connection?
Note : i connected to this ad using python-ldap, so I know it can work
First of all, thanks for this tool. I look forward to use it.
I want to use it to admin an another AD.
pyad.set_defaults(ldap_server="url.of.my.ad", username="username", password="passwd",ssl=False,ldap_port="389")
When trying
user = pyad.aduser.ADUser.from_cn("username")
I get :
Traceback (most recent call last):\Outils\GIT\ga-werd-traitement_habilitations\python> File ".\werd-run.py", line 13, in <module> user = pyad.aduser.ADUser.from_cn("username") File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adobject.py", line 135, in from_cn return cls(adsearch.by_cn(cn, search_base, options), None, options) File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adsearch.py", line 17, in by_cn type="GC") File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\pyad\adquery.py", line 78, in execute_query self.__rs, self.__rc = command.Execute() File "<COMObject ADODB.Command>", line 3, in Execute File "C:\Users\username\Documents\Outils\GIT\ga-werd-traitement_habilitations\python\env\lib\site-packages\win32com\client\dynamic.py", line 287, in _ApplyTypes_ result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args) pywintypes.com_error: (-2147352567, 'Une exception s’est produite.', (0, 'Active Directory', 'Une erreur d’opération s’est produite.\r\n', None, 0, -2147217865), None)
To translate from french "an operation error has occured" is not really helpful.
I tried ADuser from cn on my rootDSE, it works. I tried several combinations (username with or without domain?) but no luck. Is there a way to diagnose what's wrong on the connection? Note : i connected to this ad using python-ldap, so I know it can work