[PATCH] Re: Discuss: samba-tool configure subcommand

William Brown william at blackhats.net.au
Thu Apr 26 01:54:17 UTC 2018


> > 
> > Thoughts and suggestions? For now I'll start writing the patch, but
> > I'll alter it based on comments later.
> > 
> > Thanks,
> > 
> > William
> > 
> 
> To start some more discussion here is an initial patch adding support
> for domain settings management, and forest configuration management.
> I
> still plan to add test cases, and I'm open to changing some of these
> values.
> 
> domain currently has a translation mechanism to make settings
> "pretty",
> but I can see a case to remove this.
> 
> Forest has a framework to support multiple types of settings display
> and setting based on the different objects that may exists. This
> omits
> the translation mech for simplicity. I think I prefer this approach.
> 
> An example usage is:
> 
> I0> /usr/local/samba/bin/samba-tool forest directory_service show -H
> ldaps://localhost --simple-bind-
> dn='administrator at adt.blackhats.net.au'  
> Password for [administrator at adt.blackhats.net.au]:
> Settings for CN=Directory Service,CN=Windows
> NT,CN=Services,CN=Configuration,DC=adt,DC=blackhats,DC=net,DC=au
> dsheuristics: 0000000
> 
> I0> /usr/local/samba/bin/samba-tool forest directory_service
> dsheuristics 0000002 -H ldaps://localhost --simple-bind-
> dn='administrator at adt.blackhats.net.au'
> Password for [administrator at adt.blackhats.net.au]:
> 
> I0> /usr/local/samba/bin/samba-tool forest directory_service show -H
> ldaps://localhost --simple-bind-
> dn='administrator at adt.blackhats.net.au'
> Password for [administrator at adt.blackhats.net.au]:
> Settings for CN=Directory Service,CN=Windows
> NT,CN=Services,CN=Configuration,DC=adt,DC=blackhats,DC=net,DC=au
> dsheuristics: 0000002

Hi all,

I have updated this based on the feedback. This is now two patches. I
also opted to simplify the domain command to NOT have the "pretty"
option names, rather we can use docs and --help strings to help explain
these values. This makes code and references to MS or other docs
easier.

I have also added man page references and tests to verify the behaviour
of these commands. I hope that in time we can expand these commands to
be able to configure much more, but it's a simple and good start.

Note, apply the forest patch first, then the domain patch.

I hope this helps!

Thanks,

William
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-python-samba-netcmd-domain.py-add-configuration-cont.patch
Type: text/x-patch
Size: 10025 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180426/09f7ed8f/0002-python-samba-netcmd-domain.py-add-configuration-cont.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-samba-netcmd-forest.py-main.py-add-configurat.patch
Type: text/x-patch
Size: 11917 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180426/09f7ed8f/0001-python-samba-netcmd-forest.py-main.py-add-configurat.bin>


More information about the samba-technical mailing list