zakird / pyad

Python Active Directory Tools | *Not actively maintained*
http://zakird.github.io/pyad/
176 stars 72 forks source link

Trouble getting Connection #78

Open zachtrulby opened 6 years ago

zachtrulby commented 6 years ago

Tried using sample script (shown below):

from pyad import aduser

user = aduser.ADUser.from_cn("user_dummy", options = dict(ldap_server = "d1.dldomain.com"))

Error that I've come across exists on line 86, in get_single_result: """raises invalidResults(self.get_row_count()) invalidResults: The specified query resturned 0 results. getSingleResults only functions with a single result."""

Any help with this matter would be greatly appreciated!

-Zach

rlourenco1980 commented 6 years ago

hi Zach i have the exact same problem. did you ever resolve this?

stevenpitts commented 5 years ago

The script is trying to find a user with the cn "user_dummy"; unless your domain has a user with cn "user_dummy", you'll get 0 results, which is what you got. Am I misunderstanding the question?