How can I connect a Windows 8 PC to a Samba domain

11

I am using Samba 3, and want to join my Windows 8 PC to the Samba domain.

Windows 8 cannot join out of the box, so I added the following registry entries:

HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
        DWORD DomainCompatibilityMode 1
        DWORD DNSNameResolutionRequired 0 

And now it talks to the Samba server ok, however I get the following error: Samba Windows 8 error

And I notice that the machine name created on the samba server does not match its name:

win-8jq3fg1n74e$:x:30003:30003:Machine:/var/lib/nobody:/bin/false

It is like it is using an internal name.

The following is the error in the 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.

Paul

Posted 2012-10-20T23:13:04.917

Reputation: 52 173

What do you mean can't join out of the box? Are you using Windows 8 core, not Pro, or is there something else wrong? – nhinkle – 2012-10-21T04:03:02.033

@nhinkle I mean in the same way that Windows 7 cannot join a Samba domain out of the box - Samba3 supports NT type domains, and W7 and W8 so needs the registry settings above before you begin. – Paul – 2012-10-21T04:06:32.943

Ahh, I see. So it's an issue of backwards-compatibility then. Thanks for clarifying. – nhinkle – 2012-10-21T04:24:44.333

Answers

5

There are two things I did to get this to work, though I believe the first might be all that is required:

  1. It appears that while you set the machine name fairly early on in the setup, it doesn't actually take until another reboot. So internally it is win-xxxxxxxxxxx until a reboot where it then takes on the machine name defined in the Computer Name dialog above.

  2. Setting a primary suffix in the Computer Name dialog

With the registry settings in the OP and an additional boot (and possibly ensuring there is a suffix), joining Samba domains works fine.

Paul

Posted 2012-10-20T23:13:04.917

Reputation: 52 173

1I think changing the computer name while your are joining seems to be a fairly common mistake. You change the system name, reboot, then join, reboot. If you attempt to change the system name while joining a domain - it will attempt to use the old system name to join and Bad Things Will Happen (tm). – Natalie Adams – 2012-10-22T18:05:09.490

The computer name wasn't changed during joining. – Paul – 2012-10-22T20:53:50.593

0

[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)

I had the same problem. I had probably broken the relation between user and group.

I deleted user and group, created new ones, and it was OK.

Jam

Posted 2012-10-20T23:13:04.917

Reputation: 1