Bug 11910 - New install 4.4.3 from sources fails smbclient test
Summary: New install 4.4.3 from sources fails smbclient test
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.4.3
Hardware: All Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-05-08 08:09 UTC by trenta
Modified: 2016-06-01 07:36 UTC (History)
4 users (show)

See Also:

Possible patch for master (2.23 KB, text/plain)
2016-05-18 10:14 UTC, Stefan Metzmacher
no flags Details
Patch for v4-4-test (2.43 KB, patch)
2016-05-19 11:39 UTC, Stefan Metzmacher
asn: review+
metze: review? (gd)
Patch for v4-3-test (2.43 KB, patch)
2016-05-19 11:40 UTC, Stefan Metzmacher
asn: review+
metze: review? (gd)
Patch for v4-2-test (2.42 KB, patch)
2016-05-19 11:41 UTC, Stefan Metzmacher
asn: review+
metze: review? (gd)

Note You need to log in before you can comment on or make changes to this bug.
Description trenta 2016-05-08 08:09:01 UTC

I have compiled from sources 4.4.3 as it was detailed in 
https://wiki.samba.org/index.php/Build_Samba_from_source and https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller with a Debian 8 and we have problems with smbclient -L localhost -U%

we receive 
# smbclient -L localhost -U%
Domain=[SAMDOM] OS=[Windows 6.1] Server=[Samba 4.4.3]

Log during executing smbclient command show;
==> /usr/local/samba/var/log.smbd <==
[2016/05/07 22:23:16.944222,  0] ../libcli/smb/smb_signing.c:138(smb_signing_good)
  smb_signing_good: BAD SIG: seq 2
[2016/05/07 22:23:16.949161,  0] ../source3/smbd/process.c:572(receive_smb_talloc)
  receive_smb: SMB Signature verification failed on incoming packet!

==> /var/log/syslog <==
May  7 22:23:16 debian8DC1 smbd[741]: [2016/05/07 22:23:16.944222,  0] ../libcli/smb/smb_signing.c:138(smb_signing_good)
May  7 22:23:16 debian8DC1 smbd[741]:   smb_signing_good: BAD SIG: seq 2
May  7 22:23:16 debian8DC1 smbd[741]: [2016/05/07 22:23:16.949161,  0] ../source3/smbd/process.c:572(receive_smb_talloc)
May  7 22:23:16 debian8DC1 smbd[741]:   receive_smb: SMB Signature verification failed on incoming packet!

Other test like 
#smbclient //localhost/netlogon -UAdministrator -c 'ls'
#host -t SRV _ldap._tcp.samdom.example.com.
#host -t SRV _kerberos._udp.samdom.example.com.
#host -t A debian8DC1.samdom.example.com.
are working

# Global parameters
        netbios name = DEBIAN8DC1
        realm = SAMDOM.EXAMPLE.COM
        workgroup = SAMDOM
        dns forwarder =
        server role = active directory domain controller
        idmap_ldb:use rfc2307 = yes

        path = /usr/local/samba/var/locks/sysvol/samdom.example.com/scripts
        read only = No

        path = /usr/local/samba/var/locks/sysvol
        read only = No

A possible workaround
If we add 
       server signing = Auto

Then works 
# smbclient -L localhost -U%
Domain=[SAMDOM] OS=[Windows 6.1] Server=[Samba 4.4.3]

        Sharename       Type      Comment
        ---------       ----      -------
        netlogon        Disk
        sysvol          Disk
        IPC$            IPC       IPC Service (Samba 4.4.3)
Domain=[SAMDOM] OS=[Windows 6.1] Server=[Samba 4.4.3]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------

Tried sama install with same server with 4.4.2 and works perfect, error only reproduced with 4.4.3
Comment 2 Christian Ambach 2016-05-11 07:32:28 UTC
Where is your smbclient binary coming from?
dpkg -S $(which smbclient) should tell you, e.g.
# dpkg -S $(which smbclient)
smbclient: /usr/bin/smbclient
# apt show smbclient should tell you the version
Comment 3 trenta 2016-05-11 17:53:11 UTC
Samba was installed from sources and any samba packages was installed from debian repositories:

# dpkg -l |grep smb
# dpkg -l |grep samba

No results

# dpkg -S $(which smbclient)
dpkg-query: no path found matching pattern /usr/local/samba/bin//smbclient

# apt show smbclient
Package: smbclient
Source: samba
Version: 2:4.2.10+dfsg-0+deb8u2
Installed-Size: 906 kB
Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Replaces: samba (<< 2.999+3.0.alpha21-4), samba-doc (<< 2:4.0.5~), samba4-clients (<< 4.0.5), smbget
Provides: samba-client
Depends: samba-common (= 2:4.2.10+dfsg-0+deb8u2), libarchive13, libbsd0 (>= 0.0), libc6 (>= 2.14), libpopt0 (>= 1.14), libreadline6 (>= 6.0), libsmbclient (>= 2:4.0.3+dfsg1), libtalloc2 (>= 2.0.4~git20101213), libtevent0 (>= 0.9.9), samba-libs (= 2:4.2.10+dfsg-0+deb8u2)
Suggests: cifs-utils, heimdal-clients
Conflicts: samba-doc (<< 2:4.0.5~), samba4-clients (<< 4.0.5)
Homepage: http://www.samba.org
Pre-Depends: dpkg (>= 1.15.6~)
Section: net
Priority: optional
Download-Size: 335 kB
APT-Sources: http://security.debian.org/ jessie/updates/main amd64 Packages
Description: command-line SMB/CIFS clients for Unix
 Samba is an implementation of the SMB/CIFS protocol for Unix systems,
 providing support for cross-platform file and printer sharing with
 Microsoft Windows, OS X, and other Unix systems.
 This package contains command-line utilities for accessing Microsoft
 Windows and Samba servers, including smbclient, smbtar, and smbspool.
 Utilities for mounting shares locally are found in the package

N: There is 1 additional record. Please use the '-a' switch to see it

smbclient binaries
~# find / -iname smbclient

# /local/install/samba-4.4.3/bin/smbclient -V
Version 4.4.3

I hope that this can help...
Comment 4 trenta 2016-05-11 17:54:05 UTC
same server with 4.4.2 sources working without any problem with
# smbclient -L localhost -U%
Comment 5 Christian Ambach 2016-05-12 13:37:57 UTC
What I was was trying to find out is if the smbclient binary you are using is the original one that came with Ubuntu (4.2.10), or a self compiled one (4.4.3).

As your comments only used "smbclient" (and not /usr/local/... or ./smbclient), I assume you are using the 4.2.10 version.

Can you confirm?
Comment 6 Christian Ambach 2016-05-12 14:30:48 UTC
Got it reproduced. Does not depend on smbclient version.
Comment 7 trenta 2016-05-12 17:09:00 UTC
my tests were made in a debian8 jessie without any samba installed, only compile 4.4.3 frkm official sources and using smbcljent compiled with 4.4.3, not used any other component of samba 4.4.3
Comment 8 Stefan Metzmacher 2016-05-18 10:14:48 UTC
Created attachment 12107 [details]
Possible patch for master
Comment 9 trenta 2016-05-18 19:28:30 UTC
Solved with latest master branch

Thanks and great job!!
Comment 10 trenta 2016-05-18 19:29:09 UTC
When will be available to latest 4.4 branch? any scheduled date?

Comment 11 Stefan Metzmacher 2016-05-19 11:39:24 UTC
Created attachment 12111 [details]
Patch for v4-4-test
Comment 12 Stefan Metzmacher 2016-05-19 11:40:29 UTC
Created attachment 12112 [details]
Patch for v4-3-test
Comment 13 Stefan Metzmacher 2016-05-19 11:41:48 UTC
Created attachment 12113 [details]
Patch for v4-2-test
Comment 14 Andreas Schneider 2016-05-20 08:28:04 UTC
Karolin, please push the patches to the relevant branches. Thanks!
Comment 15 Karolin Seeger 2016-05-30 09:40:47 UTC
(In reply to Andreas Schneider from comment #14)
Pushed to autobuild-v4-[4|3|2]-test.
Comment 16 Karolin Seeger 2016-06-01 07:35:24 UTC
(In reply to Karolin Seeger from comment #15)
Pushed to all branches.
Closing out bug report.

Comment 17 Karolin Seeger 2016-06-01 07:36:22 UTC
(In reply to trenta from comment #10)
Samba 4.4.4 is scheduled for Tuesday, June 7.