Bug 11209 - samba-tool testparm output is unreliabe
Summary: samba-tool testparm output is unreliabe
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.1.17
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-04-09 07:04 UTC by Björn Jacke
Modified: 2015-04-13 20:59 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2015-04-09 07:04:31 UTC
In Samba 4.1 the defaul of server max protocol is SMB3.

samba-tool testparm -v says that it is NT1 though.

I cross-checked that SMB3 is really the used default value. Setting it to NT1 explicitly works as expected and really sets is to NT1.

The output of "samba-tool testparm -v" is just incorect.

Another difference to the testparm tool is that "samba-tool testparm" gives back every explicitly set parameter from smb.conf, even when they are set to the default values.
Comment 1 Stefan Metzmacher 2015-04-09 07:35:57 UTC
This is already fixed in 4.2.

In 4.1 samba-tool testparm -v showed the default for the source4/smb_server...
Comment 2 Stefan Metzmacher 2015-04-09 07:36:33 UTC
I don't think we'll backport all the patches to 4.1...
Comment 3 Andrew Bartlett 2015-04-12 03:19:49 UTC
Agreed.  Even if we could backport them, it would change defaults and generally do things we just don't do in a point release.
Comment 4 Björn Jacke 2015-04-13 13:06:21 UTC
On 2015-04-12 at 03:19 +0000 samba-bugs@samba.org sent off:
> --- Comment #3 from Andrew Bartlett <abartlet@samba.org> ---
> Agreed.  Even if we could backport them, it would change defaults and generally
> do things we just don't do in a point release.

Andrew, you didn't get the actual point of the bug report. It would just ouput the
actually used defaults, not change defaults. If you would put the output of
"samba-tool testparm -v" into a smb.conf, then you would change the default
values (like you would set server max protocol to NT1 even though the actual
default is SMB3).
Comment 5 Andrew Bartlett 2015-04-13 19:40:17 UTC
samba-tool testparm shows the actually used defaults for the source4 code.  Yes, I realise it is hard to comprehend the horror, but we shipped Samba 4.0 with different defaults for code in different parts of the tree!
Comment 6 Björn Jacke 2015-04-13 20:09:13 UTC
Andrew, please read the initial report and don't say it's wrong without *verifying* it :). If you don't believe it, then please run samba-tool testparm -v on a 4.1 AD server, see that server max protocol is said to be NT1. Then make a network sniff to see that the server actually speaks smb3.