[Samba] 'samba-tool testparm --section' bugs?

Andrew Bartlett abartlet at samba.org
Tue Sep 24 18:58:34 UTC 2019


On Tue, 2019-09-24 at 19:41 +0100, Rowland penny wrote:
> On 24/09/2019 19:20, Andrew Bartlett wrote:
> > 
> > G'Day Rowland,
> > 
> > Regardless of the use case, both tools should parse the file quite
> > successfully.  The only exceptions I'm aware of are:
> >   - the 'registry' configuration, which is only known about by
> > 'testparm'.
> >   - include statements that use % modifiers.  Again, these only
> > work in
> > the file server and so are only known about by testparm.
> > 
> > Otherwise, if there is a behaviour difference it is a bug that
> > should
> > be fixed.
> > 
> > Thanks!
> > 
> > Andrew Bartlett
> 
> Good Evening Andrew,
> 
> Yes both tools should parse the smb.conf, but it is a matter of
> horses 
> for courses ;-)

I would rather our tools 'just worked'.  All these legacy gaps in the
seam between the former branches need addressing, not embedding in our
culture.

> If you use just 'testparm' on a DC, you will get a different result
> than 
> if you use 'samba-tool testparm'.

Then we need to fix that. 

> If you use 'samba-tool testparm' on a Unix domain member, it throws
> an 
> exception.

Again, we need to fix that. 

> Yes, this probably is a bug, it probably should print something like
> 'Do 
> not use most of the samba-tool subcommands on a Unix domain member'
> 
> Easiest way out of this (well for me anyway, seeing as I cannot seem
> to 
> get patches into Samba), advise users to use samba-tool only on a DC.

I do realise that this (such advise) is the tool that you know well, as
you freely dispense it.  

That said, we have sharp edges in Samba, and while we can tell tell
users to avoid them endlessly, we should also improve them.

The reason you don't often see the reverse, that is 'source3' tools
failing spectacularly on the AD DC is because when merging the two
codebases, I put significant effort into compatability code to ensure
they would continue to 'just work'.  That is why smbpasswd and pdbedit
all function quite fine against the AD DC.  

We should continue to weave this project into one seamless cloth.

I'm sorry you have trouble getting patches merged.  I see you almost
got to the end with 
https://gitlab.com/samba-team/samba/merge_requests/602 and I encourage
you to persist.

I hope this clarifies things,

Andrew Bartlett

-- 
Andrew Bartlett                       https://samba.org/~abartlet/
Authentication Developer, Samba Team  https://samba.org
Samba Developer, Catalyst IT          
https://catalyst.net.nz/services/samba






More information about the samba mailing list