Giter Site home page Giter Site logo

active_directory's Introduction

active_directory

Active Directory (AD) is Microsoft's answer to LDAP, the industry-standard directory service holding information about users, computers and other resources in a tree structure, arranged by departments or geographical location, and optimized for searching.

The active_directory module is a light wrapper around the AD functionality. It allows easy searching of common objects (users, groups, ou) and browsing of their contents. AD objects are wrapped in Python objects which ease their use in Python code while allowing the underlying object to be accessed easily.

active_directory is tested on all versions of Python from 2.4 to 3.2. It makes heavy use of the adsi modules in the pywin32 extensions.

Docs (will be) hosted at: http://active_directory.readthedocs.org/

active_directory's People

Contributors

tjguk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

active_directory's Issues

Group with \ in name

When I do the following with a group that has \ in the name, it returns None

domain_admins = active_directory.find_group ("FULL\TEST")

What do I need to do to get this to work?

python3: .objectSid fails with "TypeError: SID() takes exactly 2 arguments (1 given)"

import active_directory
users = active_directory.search(objectClass="User", objectCategory="person")
print(next(users).objectSid)

Traceback (most recent call last):
File "test.py", line 4, in
print(next(users).objectSid)
File "lib\site-packages\active_directory.py", line 809, in getattr
self._delegate_map[name] = converter(attr)
File "lib\site-packages\active_directory.py", line 536, in convert_to_sid
return win32security.SID(item)
TypeError: SID() takes exactly 2 arguments (1 given)

the code above works with python2!

to make it basicly work i had to modify win32comext\adsi__init__.py:

http://stackoverflow.com/questions/27404312/python-active-directory-module-no-module-named-adsi

Python3.6: ModuleNotFoundError: No module named 'adsi' Error

hi,

I am getting following error with Import active_directory. can you please help here? Is it supported with python36?
from active_directory import *
File "C:\Program Files\Python36\lib\site-packages\active_directory-0.8-py3.6.egg\active_directory.py", line 105, in
File "C:\Program Files\Python36\lib\site-packages\win32comext\adsi_init_.py", line 25, in
from adsi import *
ModuleNotFoundError: No module named 'adsi'

Error using AD_object.walk(): "AttributeError: 'str' object has no attribute 'Class'"

Error occurs when walking over users in an AD_object

File "X:/path/to/file.py", line 41, in main for group, groups, users in ad_grp.walk(): File "C:\Python33\lib\site-packages\active_directory.py", line 1092, in walk groups = [m for m in members if m.Class == 'group'] File "C:\Python33\lib\site-packages\active_directory.py", line 1092, in <listcomp> groups = [m for m in members if m.Class == 'group'] AttributeError: 'str' object has no attribute 'Class'

Invalid Syntax while Importing

Hello,

When I try to import active_directory it throws a syntax error as below.

line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import active_directory as ad
File "C:.....\site-packages\active_directory.py", line 115
return (x&0x80000000L and -2*0x40000000 or 0) + int(x&0x7fffffff)

Thanks,
Sujith.

Upload to Pip

Hi,
I really like your module. But sadly it isn't available in Pypi.
Can you please upload it?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.