# Samba 3.6.12 and Windows 7 issues [Solved]

## CarstenIQ

Hello Fellow Gentoo users!

    I have curious Samba/Windows issues. In fact not just with Windows but also with Mac OSX. The first, when I transfer large files >= 6MB, Windows 7 as well as Max OSX seams to lose connections. I get ... "The is a problem accessing \\MYSERVER\MYSHARE" message on Windows 7. I have reviewed the log files and there is no error report from samba 3.6.12 whatsoever. 

I have tried various configurations in the smb.conf from setting NT1 as highest protocol, up to client ntlmv2 auth = yes and no etc etc which all resulted in the same. The only thing that seamed to have worked partially with success was setting strict sync = yes and sync always = yes with NT1 plus manipulating the windows 7 to accept NTLMv1 etc etc. This unfortunately resulted in a mayor performance penalty (500KB/s). In fact I never got more than 1MB/s on Windows 7. On my Gentoo client I get 7.9M/s and so on Knoppix Live CD which I run on the same machines that have Windows 7 to copy the files to the server. 

Also printing is a bitch on the Windows 7 clients. Most of the time printing does not work. I assume that it depends upon file size send to the server as well. 

```
[global]                                                                                                                                                    

        workgroup = OFICINA                                                                                                                                 

        server string = Servidor Viajomexico                                                                                                                

        interfaces = 192.168.1.0/24                                                                                                                         

        map to guest = Bad User                                                                                                                             

        guest account = guest                                                                                                                               

        log file = /var/log/samba/log.%m                                                                                                                    

        max log size = 50                                                                                                                                   

        smb ports = 139

        max protocol = SMB2

        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=32768 SO_SNDBUF=32768

        printcap cache time = 0

        printcap name = cups

        os level = 33

        preferred master = Yes

        domain master = Yes

        dns proxy = No

        socket address = 192.168.1.14

        idmap config * : backend = tdb

        guest ok = Yes

        hosts allow = 192.168.1., 127.

        strict sync = Yes

        cups options = raw

[homes]

        comment = Home Directory

        read only = No

        guest ok = No

        nt acl support = No

        browseable = No

        dos filemode = Yes

[print$]

        comment = Printer Drivers

        path = /var/lib/samba/drivers

        write list = root, @wheel

        create mask = 0700

        directory mask = 0700

        guest ok = No

[ML-2510]

        comment = SAMSUNG ML-2510 Laser Mono

        path = /var/spool/samba

        valid users = @development, @callcenter, nobody, guest

        write list = @development, @callcenter, nobody, guest

        create mask = 0700

        directory mask = 0700

        printable = Yes

        print ok = Yes

        printer name = ML-2510

        use client driver = Yes

[printers]

        comment = Todos los Impresoras

        path = /var/spool/samba

        printable = Yes

        print ok = Yes

        browseable = No

[Desarrollo]

        comment = Carpeta compartido de equipo de desarrollo

        path = /home/development

        valid users = @development

        write list = @development

        force user = carsten

        force group = development

        read only = No

        create mask = 0770

        force create mode = 0770

        directory mask = 0770

        force directory mode = 0770

        guest ok = No

        nt acl support = No

        veto files = /*.exe/*.lsp/*.vbs/*.htt/*.msi/*.inf/

        dos filemode = Yes

        vfs objects = recycle, full_audit

        full_audit:priority = NOTICE

        full_audit:facility = local0

        full_audit:failure = none

        full_audit:success = mkdir rename unlink link rmdir pwrite

        full_audit:prefix = %u|%I|%m|%S

        recycle:excludedir = /tmp /temp /cache

        recycle:exclude = ._* Thumb.db .DS_Store *.~tm *.tmp *.temp *.o *.obj ~$* *.~$

        recycle:subdir_mode = 0770

        recycle:directory_mode = 0770

        recycle:maxsize = 25000000

        recycle:touch = Yes

        recycle:versions = Yes

        recycle:keeptree = Yes

        recycle:repository = Papelera

[Call Center]

        comment = Carpeta compartido de centro de llamadas

        path = /home/callcenter

        valid users = @development, @callcenter

        write list = @development, @callcenter

        force user = laura

        force group = callcenter

        read only = No

        create mask = 0770

        force create mode = 0770

        directory mask = 0770

        force directory mode = 0770

        guest ok = No

        nt acl support = No

        veto files = /*.exe/*.lsp/*.vbs/*.htt/*.msi/*.inf/

        dos filemode = Yes

        vfs objects = recycle, full_audit

        full_audit:priority = NOTICE

        full_audit:facility = local1

        full_audit:failure = none

        full_audit:success = mkdir rename unlink link rmdir pwrite

        full_audit:prefix = %u|%I|%m|%S

        recycle:excludedir = /tmp /temp /cache

        recycle:exclude = ._* Thumb.db .DS_Store *.~tm *.tmp *.temp *.o *.obj ~$* *.~$

        recycle:subdir_mode = 0770

        recycle:directory_mode = 0770

        recycle:maxsize = 25000000

        recycle:touch = Yes

        recycle:versions = Yes

        recycle:keeptree = Yes

        recycle:repository = Papelera

```

Any assistance to solve this Windows 7 issue first, is very welcome  :Very Happy: 

----------

## ShadowCat8

Greetings, 

Having had some issues myself with connectivity between Win7 and Samba 3.5.15 as well as 3.6.9, one of the things that has helped out was adding to the Global config:

```
        server signing = auto

        client signing = auto

        max protocol = smb2
```

HTH.  Let us know.

----------

## CarstenIQ

Thank you for your quick response ShadowCat8. I really appreciate it. 

Unfortunately, Windows 7 still behaves unpredictable. I wished there would be some sort of an error message from samba but still nothing. From Samba point of view, everything seams to be fine.

----------

## CarstenIQ

Ok... I upgrated to version 3.6.13 without any change. So, I changed log level to 3 and I found this ...

```

[2013/04/26 17:21:12.639508,  3] smbd/smb2_read.c:356(smb2_read_complete)

  smbd_smb2_read: fnum=[13630/Software/proteus.rar] length=65536 offset=11599872 read=65536

[2013/04/26 17:21:12.639508,  3] smbd/smb2_read.c:356(smb2_read_complete)

  smbd_smb2_read: fnum=[13630/Software/proteus.rar] length=65536 offset=11665408 read=65536

[2013/04/26 17:21:24.515402,  2] smbd/smb2_server.c:1931(smbd_smb2_request_writev_done)

  smbd_smb2_request_writev_done: client write error NT_STATUS_CONNECTION_RESET

[2013/04/26 17:21:24.515402,  2] smbd/close.c:696(close_normal_file)

  carsten closed file Software/proteus.rar (numopen=2) NT_STATUS_OK

```

This is the interesting part : smbd_smb2_request_writev_done: client write error NT_STATUS_CONNECTION_RESET

----------

## CarstenIQ

Ok... I found a solution. Not quite happy about it but it works. I don't get disconnected and I have ~12MB/s transfer. 

For those who are interest how I got Samba to work well with Windows 7. 

1) Goto the Windows 7 "Network and Sharing Center".

2) Click on "Choose homegroup and sharing options".

3) Click on "Change advanced sharing settings".

4) Change "File share connection" to "Enable file sharing for devices that use 40- or 56-bit encryption".

Optional: I turned of password protected sharing since I didn't need it. All is on Samba Server.

I hope it will save someone some headaches.

----------

