[Samba] SMB2 and X-plore

Oleksandr Natalenko oleksandr at natalenko.name
Wed Jul 14 11:43:52 UTC 2021


Hello.

I've got a small home server for basic file sharing across devices, and
I have Samba on it:

```
[global]
        disable spoolss = Yes
        domain master = No
        load printers = No
        map to guest = Bad User
        name resolve order = host
        printcap name = /dev/null
        server min protocol = NT1
        server string = Samba Server %v
        show add printer wizard = No
        socket options = TCP_NODELAY SO_KEEPALIVE
        idmap config * : backend = tdb
        printing = bsd

[Shared]
        browseable = No
        force group = _shared
        force user = _shared
        guest ok = Yes
        path = /mnt/shared
        read only = No
        veto files = /lost+found/
```

The goal here is to allow all the clients to connect without
user/password, hence "map to guest = Bad User". Also the goal is to get
rid of old "NT1" protocol.

The problem is with X-plore on Android. It supports SMB1 and SMB2. If
"server min protocol = NT1" is specified, it connects just fine in SMB1
mode. If "NT1" is not specified (SMB2_02 is used as a default), it cannot
connect using SMB2. This is what I see on the server side when X-plore
tries to connect in SMB2 mode:

```
smbd[1234]: [2021/07/07 08:40:20.489935,  0] ../../libcli/smb/smb2_signing.c:
307(smb2_signing_check_pdu)
smbd[1234]:   Bad SMB2 signature for message
smbd[1234]: [2021/07/07 08:40:20.490212,  0] ../../lib/util/util.c:
570(dump_data)
smbd[1234]:   [0000] CA DE 60 FA 4D DE 92 15   9F 02 1C E6 3D C6 9B 1F   
..`.M... ....=...
smbd[1234]: [2021/07/07 08:40:20.490344,  0] ../../lib/util/util.c:
570(dump_data)
smbd[1234]:   [0000] E1 38 55 D7 6D 9F 22 C2   97 E0 5D 58 B1 F7 08 F9   
.8U.m.". ..]X....
smbd[1234]: [2021/07/07 08:40:20.492594,  0] ../../libcli/smb/smb2_signing.c:
307(smb2_signing_check_pdu)
smbd[1234]:   Bad SMB2 signature for message
smbd[1234]: [2021/07/07 08:40:20.492757,  0] ../../lib/util/util.c:
570(dump_data)
smbd[1234]:   [0000] 88 4E F0 54 EE 5C C2 64   E4 8E E5 5B 26 14 E8 CC   .N.T.
\.d ...[&...
smbd[1234]: [2021/07/07 08:40:20.492842,  0] ../../lib/util/util.c:
570(dump_data)
smbd[1234]:   [0000] 9A AE C8 DF 24 8E B2 96   B9 D1 44 44 9C D3 31 64   ....
$... ..DD..1d
```

The X-plore itself gives `Invalid SMB status: STATUS_ACCESS_DENIED` error.

Other Linux/Windows clients work just fine with this configuration.

So, what do I do to make X-plore work in SMB2 mode?

Thanks.

-- 
Oleksandr Natalenko (post-factum)





More information about the samba mailing list