StefanScherer / adfs2

Multi Vagrant environment with Active Directory
MIT License
141 stars 44 forks source link

adfs2 failed to join domain windomain.local #3

Open HtmlMak opened 6 years ago

HtmlMak commented 6 years ago

When launching vagrant up adfs2, there is no connection. Do I need to make any settings after starting DC? Or maybe incompatibility with virtualbox 5.2 and vagrant 2.0?

Log:

Ooops, workgroup!
Join the domain
First, set DNS to DC to join the domain

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 0
PSComputerName   :

Now join the domain
HasSucceeded : False
ComputerName : adfs2

Hint: vagrant reload adfs2 --provision

Stderr from the command:

powershell.exe : Add-Computer : Computer 'adfs2' failed to join domain 'windomain.local' from its current workgroup 'WORKGROUP' with
    + CategoryInfo          : NotSpecified: (Add-Computer : ...ORKGROUP' with :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
following error message: The specified domain either does not exist or could not be contacted.
At C:\vagrant\scripts\join-domain.ps1:17 char:1
+ Add-Computer -DomainName "windomain.local" -credential $DomainCred -PassThru
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (adfs2:String) [Add-Computer], InvalidOperationException
    + FullyQualifiedErrorId : FailToJoinDomainFromWorkgroup,Microsoft.PowerShell.Commands.AddComputerCommand
danielmenezesbr commented 6 years ago

I got the same error.

In my case, the root cause was SID duplication. It causes problems to join into DC.

My workaround:

StefanScherer commented 6 years ago

Maybe a look at the https://github.com/clong/DetectionLab may help. This is also a domain setup inspired by this repo.

clong commented 5 years ago

Ironically I'm running into the same issue as well (albeit at a different point): https://github.com/clong/DetectionLab/issues/221

Not sure how it's possible that the domain controller can't find the domain :-/

StefanScherer commented 5 years ago

Thanks for the hint and solution clong/DetectionLab#222 I haven't used the Vagrant setup lately, only the steps to create a DC in an Azure VM.