Questions tagged [pyad]

Use this tag for questions about the Python Active Directory module. For general questions about Active Directory on Windows, use the tag [active-directory] instead.

36 questions
0
votes
1 answer

Python - Assign user to a sub OU

I want to create an user in a Windows Active-Directory to a special OU. I got the right code already that works fine. But I want to create this user to a sub OU e.g.: Company -> User -> Sales. My code is the following: def addUser(): …
Niklas
  • 436
  • 1
  • 4
  • 16
0
votes
1 answer

Pyad connection to another server

Can someone help me to solve my issue? I try to download some user-info from server's active directory. When I tried that without pyad_setdefaults - that's ok. But when I try to connect to another server -I have an error. import pyad import…
Unicorn
  • 23
  • 5
0
votes
1 answer

How to change Active Directory user display name using Python

I have a Python script which read a PDF document and create an AD user account related the data it gets. I want in directory shown as John Doe instead of user account jdoe. Here what I have done so far: from pyad import * firstname =…
Joonaksu
  • 21
  • 3
0
votes
0 answers

Python: Using PYAD to authenticate users with Active Directory

So I realize you can use this function to check if the password a user entered id correct pyad.set_defaults(ldap_server="X.X.X.X",username=username,password=password) all I have to do is provide a username/password then try: …
0
votes
1 answer

Ambiguous Name Resolution in pyad

Is there a way to search for a user with say "bob" anywhere in their first name or last name or even full name in pyad? I know in c# we can write: string nameSearch = "bob"; Filter = "(&(objectClass=User)(anr=" + nameSearch + "))" but how would we…
0
votes
1 answer

Add group membership to AD with PyAD

I've been trying to add group membership to my user in AD via PyAD. from pyad import * pyad.set_defaults(ldap_server="someSchool.local", username="someAdmin", password='somePassword') user =…
user2919480
  • 15
  • 1
  • 6
0
votes
1 answer

Connect to AD of an Azure VM with pyad through the public IP

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',…
Elekam
  • 75
  • 1
  • 9
0
votes
1 answer

Create new organizational unit with pyad

I'm trying to use PYAD to create a new organizational unit, unfortunately i cannot find any helpful resources to do this online. Does anyone know how to do this?
0
votes
1 answer

Python pyad issue: AttributeError: module 'pyad.pyad' has no attribute 'adquery'

I am experiencing an issue when trying to use Python's pyad module. from pyad import * pyad.set_defaults(ldap_server=adserver, username="", password="") q = pyad.adquery.ADQuery() ------------------------- AttributeError: module 'pyad.pyad' has no…
0
votes
1 answer

Dynamic OptionMenu or other options in tkinter

We are trying to make a simple GUI for our HR department. We are using tkinter with PyAD and subprocess. I am trying to create a dynamic OptionMenu based on a "selection" in the previous OptionMenu. For example: "Department" OptionMenu…
0
votes
2 answers

Python pyad query does not return if computer is enabled

I have a problem with the python3 pyad module. I'd like to query my active directory environment for all PCs with some Information and if they are enabled or not. This is the code: q = pyad.adquery.ADQuery() q.execute_query( attributes = ["CN",…
DevSepp
  • 116
  • 1
  • 5
0
votes
1 answer

Python 3 pyad get_members: how to list more than 1500 members

Using pyad 0.6.0. Attempting to process members of an AD group. How do I get more than the initial 1500 group members returned by the pyad get_members() method/LDAP? Not finding much documentation regarding this method. Thanks in advance, Dennis
0
votes
0 answers

pyad.adsearch.ADQuery() fails with com_error

I try to use the python pyad module to query my Active Directory. from pyad import * pyad.set_defaults(ldap_server="xxx", username="xxx", password="xxx") q = pyad.adsearch.ADQuery() That code will produce this error: com_error: (-2147352567,…
0
votes
1 answer

pyad - cannot connect to another ldap controller

I cannot connect myself to another Active Directory through pyad libary. i want to do a query but everything i try i get following error: def ad_query_bwae(attribute, value): pyad.adbase.set_defaults(ldap_server="AD03.domain.com",…
kuruh
  • 3
  • 3
0
votes
1 answer

python active directory module pyad max returned group members

How can I return all group members if it is over 1500, I'm using below code Using execute_query member attribute in the group is empty import pyad.adquery q = pyad.adquery.ADQuery() q.execute_query( attributes = ["CN", "sAMAccountName",…
Amr
  • 2,045
  • 14
  • 17