Are there Python equivalents for the net ads command?
realrichardsharpe at gmail.com
Thu Aug 13 22:25:51 UTC 2015
On Thu, Aug 13, 2015 at 2:58 PM, Andrew Bartlett <abartlet at samba.org> wrote:
> 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
> samba.net.join, 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
OK, I will have a think about that. We use a very large amount of
Python here that I am becoming a Python weenie.
Life would be so much easier if we had Python bindings or wrappers and
could throw Python exceptions ... although, getting them into
protobufs are another issue.
More information about the samba-technical