[Samba] Using samba-python to query AD? Status of API?

mathias dufresne infractory at gmail.com
Wed Nov 4 16:09:45 UTC 2015


Once you have installed Samba to be able to run it as Active Directory you
would have samba-tool available.

# which samba-tool
# file /usr/bin/samba-tool
/usr/bin/samba-tool: Python script, ASCII text executable
# locate ldapcmp.py
# file /usr/lib64/python2.7/site-packages/samba/netcmd/ldapcmp.py
/usr/lib64/python2.7/site-packages/samba/netcmd/ldapcmp.py: Python script,
ASCII text executable

I gave the commands because they help to find where are really these files.
They could be in some other directory on your system.
There are a lot of other (python) files in there.

Hoping this helps.

Kindly regards,


2015-11-04 16:58 GMT+01:00 pisymbol . <pisymbol at gmail.com>:

> Hello:
> I'd really like to leverage the samba-python API to perform 'net ads
> search' style queries for an upcoming project.
> Is there any documentation or examples someone can point me to? The
> 'python/examples' directory is a misnomer (!) and the online API
> documentation was generated from 2011 and is also just as cryptic.
> I even checked the binaries in samba-client to see if any existing
> utilities are using these Python libraries but alas, they are show up
> as ELFs! :-(
> Any pointers or insights into leveraging these module will be much
> appreciated!
> -aps
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list