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 setting optional attribute of account expires using pyad

I've read the other posting about how to get the COMobject out of AD to a readable date time. Where I am stuck at now is how to set a date for an account to expire in active directory. I've read around looking how to convert date back to an…
0
votes
1 answer

Error trying to use pyad to query accounts on another domain

I'm using pyad 0.5.20 to do many operations on active directories which user can specify their connection details for example: pyad.set_defaults(ldap_server="my.server", username=myusername, password=xxx,ssl=False,ldap_port=123) And then i can for…
0
votes
0 answers

How to delete ADUser using Python pyad module

I'm having a problem with deleting ADUser. pyad.set_defaults(ldap_server="dc1.domain.com", username="service_account", password="mypassword") user = aduser.ADUser.from_dn("cn=myuser, ou=staff, dc=domain, dc=com") user.delete() Unfortunately I…
Eduard L.
  • 1
  • 2
0
votes
1 answer

Django Python and pyad

I am trying to create a simple search form in Django to query Active Directory but I keep getting com_error at /console/users/ (-2147221008, 'CoInitialize has not been called.', None, None) views.py: from pyad import pyad, aduser,…
0
votes
1 answer

Python pyad module can't set UPN

I am using pyad module in order to create active directory. I have one issue, I am not able to properly set the UPN suffix to @mycompany.local Here is the code : new_user = pyad.adcontainer.ADUser.create("Hugo Test", ou, password="Passw0rd",…
Hugo
  • 173
  • 1
  • 1
  • 6
-1
votes
1 answer

Create user using pyad without password expired

I'm using this code to create a user in active directory, using the pyad module in Python 2.7: from pyad import * pyad.set_defaults(ldap_server="IT-LHQ-DC1.LIFEALIKE.LAB", username="administrator", password="password") ou =…
ScalaMan
  • 61
  • 5
1 2
3