Hello, I am using samba 4.8.6 and 4.9.1 to build a domain. And I have a Windows 7 virtual machine to join the domain. However, I found it was fail when I used the NetJoinDomain which is the C# Library on Windows. I am using the Unsecure option, authenticating by the machine password. And Here is my code int ret = NetJoinDomain(null, myDomainName, null, null, myMachinePassword, (JoinOptions.NETSETUP_JOIN_DOMAIN | JoinOptions.NETSETUP_JOIN_UNSECURE | JoinOptions.NETSETUP_DOMAIN_IF_JOINED | JoinOptions.NETSETUP_MACHINE_PWD_PASSED)); It was successfully on samba 4.5.16. I used the same method to join the domain previously but it doesn’t work after I upgraded samba to 4.8 above. The return code is 1326 which said that UNKNOWN USERNAME OR INCORRECT PASSWORD. Does anyone have the idea about this issue? Best Regards, Joe
Jeremy Allison
2018-Oct-22 11:47 UTC
[Samba] Unable to join domain by using NetJoinDomain on Windows
On Mon, Oct 22, 2018 at 04:18:35PM +0800, 周永健 via samba wrote:> Hello, > > I am using samba 4.8.6 and 4.9.1 to build a domain. And I have a Windows 7 > virtual machine to join the domain. However, I found it was fail when I > used the NetJoinDomain which is the C# Library on Windows. > I am using the Unsecure option, authenticating by the machine password. And > Here is my code > > int ret = NetJoinDomain(null, myDomainName, null, null, myMachinePassword, > (JoinOptions.NETSETUP_JOIN_DOMAIN | JoinOptions.NETSETUP_JOIN_UNSECURE | > JoinOptions.NETSETUP_DOMAIN_IF_JOINED | > JoinOptions.NETSETUP_MACHINE_PWD_PASSED)); > > It was successfully on samba 4.5.16. I used the same method to join the > domain previously but it doesn’t work after I upgraded samba to 4.8 above. > The return code is 1326 which said that UNKNOWN USERNAME OR INCORRECT > PASSWORD. > > > Does anyone have the idea about this issue?Can you post a wireshark trace of the join failing ?
Possibly Parallel Threads
- samba4.8.x machine account authentication using NetJoinDomain faled
- samba4.8.x machine account authentication using NetJoinDomain failed
- samba4.8.x machine account authentication using NetJoinDomain failed
- samba4.8.x machine account authentication using NetJoinDomain failed
- samba4.8.x machine account authentication using NetJoinDomain faled