如何将 Windows 8 PC 连接到 Samba 域

Pau*_*aul 11 samba windows-domain windows-8

我正在使用 Samba 3,并希望将我的 Windows 8 PC 加入 Samba 域。

Windows 8 无法开箱即用,因此我添加了以下注册表项:

HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
        DWORD DomainCompatibilityMode 1
        DWORD DNSNameResolutionRequired 0 
Run Code Online (Sandbox Code Playgroud)

现在它可以与 Samba 服务器通信,但是我收到以下错误: Samba Windows 8 错误

我注意到在 samba 服务器上创建的机器名称与其名称不匹配:

win-8jq3fg1n74e$:x:30003:30003:Machine:/var/lib/nobody:/bin/false
Run Code Online (Sandbox Code Playgroud)

这就像使用内部名称一样。

以下是错误中的 smb.log

[2012/10/21 14:26:16.099520,  0] passdb/pdb_interface.c:348(pdb_default_create_user) _samr_create_user: Running the command `/usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false win-8jq3fg1n74e$' gave 9        
[2012/10/21 14:26:28.143224,  0] lib/util_sock.c:474(read_fd_with_timeout)
[2012/10/21 14:26:28.143420,  0] lib/util_sock.c:1441(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not  connected
  read_fd_with_timeout: client 0.0.0.0 read error = Connection reset by peer.
Run Code Online (Sandbox Code Playgroud)

Pau*_*aul 5

我做了两件事来让它发挥作用,但我相信第一件事可能就是所需要的:

  1. 看起来,虽然您在设置中很早就设置了机器名称,但实际上直到再次重新启动才需要。因此,在内部,它会win-xxxxxxxxxxx在重新启动之前采用上面“计算机名称”对话框中定义的机器名称。

  2. 在“计算机名”对话框中设置主后缀

使用 OP 中的注册表设置和额外的引导(并可能确保有后缀),加入 Samba 域可以正常工作。