如题

环境

  1. CentOS 7 安装配置 smba 服务,参见:CentOS 7.2 安装配置 Samba 服务器
  2. 客户端:win7旗舰版,win10 专业版,win10 教育版

现象

  1. win7旗舰版,win10 专业版,均可顺利访问到共享文件夹。
  2. win10 教育版,不可以。

解决 win10 教育版不可访问的问题

在其中两台中文版 win10 电脑上,错误提示分别如下:

  • 电脑A:请检查名称的拼写。否则,网络可能有问题。要尝试识别并解决网络问题,请单击“诊断”。错误代码: 0x80004005
  • 电脑B:你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问,这些策略可帮助保护你的电脑免受网络上不安全设备或者恶意设备的威胁。

解决

修改 Win10 网络策略。按window+R键输入gpedit.msc 来启动本地组策略编辑器。依次找到“计算机配置-管理模板-网络-Lanman工作站”这个节点,在右侧内容区可以看到“启用不安全的来宾登录”这一条策略设置。状态是“未配置”,双击它,将其状态修改为“已启用”并单击确定按钮。

在其中一台中文版的 win10 上测试重现

将上面提到的【Lanman工作站】->【启用不安全的来宾登录】设置为【未设置】,删除之前保存的用户凭据(参见windows 用户凭据管理),重新访问虚拟机的共享目录,提示如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Window Title]
网络错误

[Main Instruction]
Windows 无法访问 \\192.168.1.88

[Content]
请检查名称的拼写。否则,网络可能有问题。要尝试识别并解决网络问题,请单击“诊断”。

[^] 隐藏详细信息 [诊断(D)] [取消]

[Expanded Information]
错误代码: 0x80070035
找不到网络路径。

说明这一设置是必要的,但是,英文版的却并未解决。

另外一台 win10 英文版,按如上方法未解决

  • 提示信息:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [Window Title]
    Network Error

    [Main Instruction]
    Windows cannot access \\192.168.1.88

    [Content]
    Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems, click Diagnose.

    [^] Hide details [Diagnose] [Cancel]

    [Expanded Information]
    Error code: 0x800704b3
    The network path was either typed incorrectly, does not exist, or the network provider is not currently available. Please try retyping the path or contact your network administrator.

明显有问题的现象

尝试了网上很多办法,均无果。其中,明显有问题的情况

  1. 打开文件与打印机共享,选择【turn on file and printer sharing】之后,重新打开,还是【turn off file and printer sharing】状态
  2. 执行
    1
    2
    sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi 
    sc.exe config mrxsmb10 start= auto
  • 第一条命令执行成功,但第二条命令执行后提示:OpenService FAILED 1060

解决

进入Control Panel\Programs,点击【Turn Windows feautres on or off】,勾选 SMB 1.0/CIFS File Sharing Support 下的 SMB 1.0/CIFS Client 和 SMB 1.0/CIFS Server,点击【ok】,然后,重启电脑。

如此操作之后,之前打开文件与打印机共享的设置终于生效了,即【Turn Windows feautres on or off】终于保持到被选中状态了。

换了 IP 地址之后,出错,提示:not accessible

1
2
3
4
5
6
7
[Window Title]
Open Folder

[Content]
\\192.168.1.90\school-docs is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
A device attached to the system is not functioning.
[OK]

其它

  1. 还涉及到组策略,来宾账户设置之类的,这些是 windows 共享相关的,与本文无关,可网上搜索相关内容。
  2. win10 无法访问samba,没有权限,登录会话解决
    • win key+R,输入“control userpasswords2”,打开“用户账户”。可直接添加用户凭据。
  3. win10无法访问共享解决办法
  4. 错误提示:不允许一个用户使用一个以上用户名与一个服务器或共享资源的多重连接。中断与此服务器或共享资源的连接,然后在试一次
    • 解决:windows 下 cmd,执行:net use * /del /y