Cannot connect to Linux Samba share from Windows 10

Solution 1:

This solved my problem:

Windows 10 will try to negotiate SMB3_11, which Samba4 doesn't yet support
except in the current 4.3 release candidate. I suspect for now disabling
SMB2/3 on the Windows 10 client is your best, if not ideal, option.

Instructions for doing.this can be found
here: https://support.microsoft.com/en-us/kb/2696547

https://lists.samba.org/archive/samba/2015-September/193886.html

Further reading:

  • MSKB mentioned above: Microsoft support, KB2696547: How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server

Solution 2:

I think I have a solution that works on Windows 7 - 10 and on Server 2012

In my case commenting out my line "smb ports 139" helped.

I am using FreeBSD 10 with Samba 4.4.5

Here is a copy of my SMB4.conf. I hope it helps someone.

[global]
    netbios name = SERV
    server string = FreeBSD Samba Server
    security = ADS
    workgroup = FFTPJ
    realm = fftpj.local

    log file = /var/log/samba4/%m.log
    log level = 1

    # Default idmap config used for BUILTIN and local windows accounts/groups
    idmap config *:backend = tdb
    idmap config *:range = 2000-9999

    # idmap config for domain FFTPJ
    idmap config DOMAIN:backend = rid
    idmap config DOMAIN:range = 10000-99999

    # Use template settings for login shell and home directory
    winbind nss info = template
    winbind enum users = Yes
    winbind enum groups = Yes
    winbind use default domain = yes

    client use spnego = yes
    client ntlmv2 auth = yes

    encrypt passwords = yes
    restrict anonymous = 2

    valid users = @"Domain Users

    # **** When smb ports is Set Windows 10 clients cannot connect
    #smb ports = 139

    load printers = No
    disable spoolss = Yes
    local master = No
    hide dot files = No
    wide links = No
    store dos attributes = yes

    vfs objects = acl_xattr
    map acl inherit = yes

[images]
    comment = Images Drive
    path = /images
    read only = No

[backups]
    comment = Backup Drive
    path = /data/backup
    read only = No

Solution 3:

Problem: Windows removed SMB v1 protocol on latest Windows OS, Linux try to connect with v1 protocol and Windows/Linux fails to try protocol 2, 3 etc.

Solution: edit linux (ubuntu) Samba conf file:

sudo nano /etc/samba/smb.conf

on the [GLOBAL] section add:

client min protocol = SMB2

client max protocol = SMB3

then save file and restart samba

in my case I also had to explicit put a password or my Samba user, but I think that was my specific system problem.


Solution 4:

I agree with others related to default setting in Windows 10 as a client. Anyway I got it working WITHOUT any changes on client side with this setting in Global section on samba server (samba-4.7.1-9.el7_5.x86_64 - repo version for CentOs 7):

[global]
    workgroup = <workgroup>
    realm = <realm>
    server string = FileShare server
    netbios name = <nbname>
    interfaces = lo eth0 <...>
    hosts allow = 127. 192.168.0. <...>
    log file = /var/log/samba/log.%m
    max log size = 10240
    security = user
    map to guest = Bad Password
    usershare allow guests = No
    server signing = auto
    passdb backend = tdbsam
    local master = yes

    vfs objects = acl_xattr
    map acl inherit = yes
    store dos attributes = yes

    winbind nss info = template
    winbind enum users = Yes
    winbind enum groups = Yes
    winbind use default domain = yes

    client use spnego = yes
    client ntlmv2 auth = yes

    encrypt passwords = yes

    local master = No
    hide dot files = No
    allow insecure wide links = yes
    store dos attributes = yes