无法从Windows 10连接到Linux Samba共享


16

我有一个在Ubuntu 14.04上运行的Samba服务器版本4.1.11。我无法从Windows 10连接(但可以从Windows 7连接)。

服务器和客户端不在同一局域网中。

Windows给出的错误消息是服务器处于联机状态,但没有响应。但是,Samba日志则相反。

我已经附上了Windows 10连接失败的日志以及Windows 7连接成功的日志(供比较)。

简而言之,不同于成功的尝试,失败的尝试开始于:

switch message SMBnegprot (pid 2855) conn 0x0

然后在选择之前,它会请求许多不同的协议SMB2_FF。然后,经过一番安全协商,它切换到protocol SMB 2.???,然后是SMB3_00,其后是:

Server exit (NT_STATUS_END_OF_FILE).

成功的尝试SMB2_10从一开始就选择协议,但是Windows 10甚至都不要求该协议。

这是日志:

尝试失败(从Windows 10开始)
http://pastebin.com/M0xmBuY3

成功尝试(从Windows 7)
http://pastebin.com/jF8VzaiA

我已在评论中添加了smb.conf文件(不能有2个链接,且信誉低于10)


我的smb.conf文件:pastebin.com/CWYqGuBa
pngl 2015年

Answers:


5

我想我有一个适用于Windows 7-10和Server 2012的解决方案

以我为例,注释掉我的“ smb ports 139”行很有帮助。

我在Samba 4.4.5中使用FreeBSD 10

这是我的SMB4.conf的副本。希望对您有所帮助。

[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

在解决问题上整整一天之后,注释掉“ smb ports 139”这一行确实很有帮助!万分感谢!!
Zoltan

4

这解决了我的问题:

Windows 10将尝试协商SMB3_11,Samba4尚不支持
该版本,但当前的4.3版本候选版本除外。我怀疑现在
最好在Windows 10客户端上禁用SMB2 / 3,即使不是理想的选择。

可以在
此处找到执行说明。https : //support.microsoft.com/en-us/kb/2696547

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

进一步阅读:


1

我发现这可以正常工作,而无需编辑注册表或禁用SMB 2/3服务,我可以通过手动输入地址以及输入来连接到使用Samba-4.2.10-Debian的raspi 3。 Windows 10文件浏览器地址栏中raspi的smb.conf文件中的netbios名称设置。

我将单击“网络”选项卡,但是即使启用了网络共享,我也找不到我的samba共享,但在/// 192.168.0.22(我pi的地址)或// SAMBA(netbios名称)中输入我在smb.conf中设置),然后就可以连接和共享samba了。

当时的Windows 10仍未连接到SMB 4.x,但这似乎可以解决此问题。之后,只需映射驱动器,您就不再需要手动输入地址。

Win 10版本-10.0.14393 Build 14393(带有最新更新)

希望这对以后的任何人有帮助。

// SAMBA //192.168.0.22


这是可行的,但是需要更改访问共享的每个客户端上的设置...无需在客户端更改即可,只需在samba端添加几个“额外”选项即可实现。
卡米尔J

1

在Windows 10 Fall Creators Update和Windows Server版本1709(RS3)中,默认情况下不再安装服务器消息块版本1(SMBv1)网络协议。

程序和功能,添加/删除Windows功能...打开CIF / SMB 1.0


1

我同意与Windows 10中默认设置有关的其他内容作为客户端。无论如何,我在samba服务器的“ 全局”部分(samba-4.7.1-9.el7_5.x86_64-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

0

我遇到了同样的问题,win升级后,我的Windows 10工作站无法连接到Sambashare,错误是错误53,缺少协议,缺少注册表中的wins设置,对我而言并没有真正的帮助!

对我有用的是:

打开服务(右键单击开始->计算机管理->服务和应用程序->并单击服务)

现在在服务中,向下滚动到Workstation,服务是否正在运行?如果没有,您可能会遇到与我相同的问题。

我的3台工作PC上现在都具有依赖项+浏览器支持驱动程序+网络存储接口服务+ SMB 1.x Miniredirector + SMB 2.0 Miniredirector

我解决问题的方式是:

删除服务:sc.exe删除lanmanworkstation

重新创建服务:sc.exe config lanmanworkstationDepend = bowser / mrxsmb10 / mrxsmb20 / nsi

然后启动服务

我的Samba共享即使没有重启也可以访问。


2
伙计们,不要这样做。这将使您的网络变砖,甚至无法访问单个共享。
Beto Neto

0

我在CentOS 7.2上有Samba 4.2.10。上面的答案都不对我有用,但是当我在Windows 10上禁用巨型数据包时,一切在干净的Windows 10安装中都开始使用默认设置运行,非常简单。希望它会帮助别人。:)


0

我是Linux的初学者。我尝试了很多选择。花了几个小时后,我找到了解决方案!

(我建议制作smb.conf的副本,并尝试进行更改后)在Windows 10/7/8 / Ubuntu上于2017年7月6日使用全新安装的Ubuntu和samba可以100%运行

我认为很重要的另一件事是,更改/home/server-media/Desktop/test服务器的路径或在服务器上创建相同的路径!

要启动和停止samba,请使用命令

/etc/init.d/smbd stop
/etc/init.d/smbd start

为了便于编辑,请使用午夜指挥官。从根“ mc”启动命令

复制以下配置中的所有文本。尝试并确定它可以正常使用后,您可以删除旧的。

[global]

#editat la ora 20:30 in data 07.06.2017

server max protocol = SMB3
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes                                                                                                                   
deadtime = 15
max log size = 51200
max open files = 933761
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = Media Server
# habarnam de ce dar urmatoarele lini au importanta in wingoz
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
# time server nu conteaza dar mi-l trebuie
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = MEDIA SERVER
workgroup = WORKGROUP
# am incercat si cu = share si apar erori la pornirea samba
security = user
pid directory = /home/server-media/Desktop/test
# aici am incercat cu mai multe variante ca si 0775 sau 0700 sau 0600 etc.
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
# asta iara nu mai e important!
dos charset = CP437
unix charset = UTF-8       
log level = 1          





[homes]
comment = Home Directories
path = /home
valid users = %U
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
locking = no
strict locking = no

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
#din no in yes la read
read only = yes
available = yes
browseable = yes
writable = no
#din no in yes la guest
guest ok = yes
public = no
printable = no
locking = no
strict locking = no

[profiles]
comment = User Profiles
path = /var/lib/samba/profiles
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
#din 0600
create mode = 0666
#din 0700
directory mask = 0777
locking = no
strict locking = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
#guest am pus yes
guest ok = yes
public = no
printable = yes
locking = no
strict locking = no
#am bagat urm linii
read only = no
create mask = 0775

[pdf-documents]
path = /var/lib/samba/pdf-documents
comment = Converted PDF Documents
admin users = %U
available = yes
browseable = yes
writeable = yes
guest ok = yes
locking = no
strict locking = no

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u
lpq command =
lprm command =

[test]
path = /home/server-media/Desktop/test
comment = doar de test
valid users = test
write list = test
admin users = test
directory mask = 0755
create mode = 0777
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = yes
printable = no
locking = no
strict locking = no

您的配置中还有更多仅需的选项。但是最后,除了不需要的配置外,很少有不需要的选项,但是可以工作...感谢您的共享。
卡米尔J
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.