Are there Python equivalents for the net ads command?

Andrew Bartlett abartlet at
Thu Aug 13 21:58:45 UTC 2015

On Thu, 2015-08-13 at 12:55 -0700, Richard Sharpe wrote:
> Hi folks,
> Do these commands exist as Python commands at all?
> There are so many Python weenies around that it is becoming necessary
> to have the whole lot available in Python.

While a significant part of what net ads does can be done with the
python bindings we supply out of the source4 effort, there isn't a
direct one-to-one connection.  It would be good to add such bindings,
see how pynet wraps the source4 libnet.  Something similar to 'net ads
join' can actually be done using the python join code in, for example, but this will join using the old samba4
member code.  

That will write out a secrets.tdb along with the secrets.ldb, but it
would be better if the same code (source3/libnet) as 'net ads join' was
wrapped instead.

Other tasks that just involve ldap queries could be handled directly in


Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team
Samba Development and Support, Catalyst IT

More information about the samba-technical mailing list