Samba – Redhat 5 with Samba 3.6 leads System error 58 on Windows 7

samba

I'm currently trying to make an old Standalone Samba Share server running on Redhat 5 back to life! It was previously running version 3.0, due to a lot of issue I decided to upgrade to version 3.6 with the official package. Now, I'm correctly running samba 3.6 on Radhat 5

Red Hat Enterprise Linux Server release 5.11 (Tikanga)

Samba version 3.6.23-12.el5_11

Here is my testparm output:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[diro]"
Processing section "[dirt]"
Processing section "[dire]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = DUMMY
        server string = Samba %v
        interfaces = 127.0.0.1, eth0
        bind interfaces only = Yes
        client ipc signing = auto
        printcap name = cups
        idmap config * : backend = tdb
        cups options = raw

[diro]
        path = /home/diro
        valid users = usero
        read only = No
        create mask = 0664
        directory mask = 0775

[dirt]
        path = /home/diro/t
        valid users = usero
        read only = No
        create mask = 0777
        directory mask = 0777

[dire]
        path = /home/diro/e
        valid users = usert
        read only = No
        create mask = 0777
        directory mask = 0777

the complete smb.conf:

[global]
        workgroup = DUMMY
        server string = Samba %v
        interfaces = 127.0.0.1 eth0
        bind interfaces only = true
        printing = cups
        printcap name = cups
        load printers = yes
        client ipc signing = auto
        client signing = auto
        log level = 3
        min protocol = core
        map to guest = Bad User
        security = user
        passdb backend = tdbsam
        load printers = yes
        cups options = raw
[diro]
        path = /home/diro
        valid users = usero
        read only = No
        create mask = 0664
        directory mask = 0775

[dirt]
        path = /home/diro/t
        valid users = usero
        read only = No
        create mask = 0777
        directory mask = 0777

[dire]
        path = /home/diro/e
        valid users = usert
        read only = No
        create mask = 0777
        directory mask = 0777

I'm able to connect to one of the shares from localhost:

>$ smbclient //DUMMYMO/diro -U usero usero
Domain=[DUMMY] OS=[Unix] Server=[Samba 3.6.23-12.el5_11]
smb: \>

Which is good, but I'm still wondering why it doesn't work on a Windows 7 machine:

>$ net use x: \\DUMMYMO\diro /user:usero usero
System error 58 has occurred.

The specified server cannot perform the requested operation.

By putting the log level to 3, I'm able to see these log lines during Windows connection attempt:

[2017/11/06 15:12:46.107877,  3] lib/access.c:338(allow_access)
  Allowed connection from XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)
[2017/11/06 15:12:46.108026,  3] smbd/oplock.c:922(init_oplocks)
  init_oplocks: initializing messages.
[2017/11/06 15:12:46.108087,  3] smbd/oplock_linux.c:246(linux_init_kernel_oplocks)
  Linux kernel oplocks enabled
[2017/11/06 15:12:46.108167,  3] smbd/process.c:1609(process_smb)
  Transaction 0 of length 109 (0 toread)
[2017/11/06 15:12:46.108198,  3] smbd/process.c:1414(switch_message)
  switch message SMBnegprot (pid 13707) conn 0x0
[2017/11/06 15:12:46.108463,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108496,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108517,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108537,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108556,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108576,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NotSmb]
[2017/11/06 15:12:46.108595,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [SMB 2.002]
[2017/11/06 15:12:46.108615,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [SMB 2.???]
[2017/11/06 15:12:46.108669,  0] smbd/negprot.c:706(reply_negprot)
  No protocol supported !
[2017/11/06 15:12:46.110716,  1] smbd/process.c:457(receive_smb_talloc)
  receive_smb_raw_talloc failed for client XXX.XXX.XXX.XXX read error = NT_STATUS_CONNECTION_RESET.
[2017/11/06 15:12:46.110790,  3] smbd/server_exit.c:181(exit_server_common)
  Server exit (failed to receive smb request)

This is the network trace:

>$ sudo tcpdump -i eth0 -nn "tcp port 445"
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
15:21:05.292627 IP XXX.XXX.XXX.XXX.54997 > YYY.YYY.YYY.YYY.445: S 946161236:946161236(0) win 8192 <mss 1380,nop,wscale 8,nop,nop,sackOK>
15:21:05.292732 IP YYY.YYY.YYY.YYY.445 > XXX.XXX.XXX.XXX.54997: S 2489729164:2489729164(0) ack 946161237 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 7>
15:21:05.294416 IP XXX.XXX.XXX.XXX.54997 > YYY.YYY.YYY.YYY.445: . ack 1 win 258
15:21:05.294748 IP XXX.XXX.XXX.XXX.54997 > YYY.YYY.YYY.YYY.445: P 1:110(109) ack 1 win 258
15:21:05.294772 IP YYY.YYY.YYY.YYY.445 > XXX.XXX.XXX.XXX.54997: . ack 110 win 46
15:21:05.298603 IP YYY.YYY.YYY.YYY.445 > XXX.XXX.XXX.XXX.54997: P 1:42(41) ack 110 win 46
15:21:05.300286 IP XXX.XXX.XXX.XXX.54997 > YYY.YYY.YYY.YYY.445: R 110:110(0) ack 42 win 0

As the log mentioned, the client send a RST flag directly after server's answer and I don't know why. I already have tried many solutions like min protocol, server signing without success.

I ran out of solutions.. Do you have any suggestions?

Note that I don't have admin access on my desktop and I guess many parameters are imposed by the domain.

Best Answer

Thanks to the hint of MadHatter, I was able to resolve the issue: The client just requires SMB2 instead of SMB3. This trick can easily be applied in the configuration under the Global section:

max protocol = SMB2

Related Topic