clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices
MIT License
4.64k stars 987 forks source link

Proxmox duplicated SID when joining a domain #768

Closed leitosama closed 2 years ago

leitosama commented 2 years ago

Building from master (commit 8fffa0e9840fc6f2a1bea7844a0ec5a6cd3754b8)

Description of the issue:

While configure the wef host with Ansible, I'm running into the following error message that causes the build to stop:

"Computer 'wef' failed to join domain 'windomain.local' from its current workgroup 'WORKGROUP' with following error message: The domain join cannot be completed because the SID of the domain you attempted to join was identical to the SID of this machine. This is a symptom of an improperly cloned operating system install. You should run sysprep on this machine in order to generate a new machine SID. Please see http://go.microsoft.com/fwlink/?LinkId=168895 for more information."

I did some research and found similar bug from ESXi version. Bug is fixed by enabling sysprep.bat in Packer stage ("shutdown_command" parameter). Packer provider for Proxmox does not have required parameter and these may be a cause of bug.

jhill-cmd commented 2 years ago

https://github.com/clong/DetectionLab/pull/737#issuecomment-1012625523

sukster commented 2 years ago

Hello, sorry about this error. I forgot to do Sysprep. I made changes in one of my branches which I need to test: github.com/sukster/DetectionLab/tree/proxmox/Proxmox/Packer. See the files with "Testing Sysprep" comment. I will try to test this within the next days and keep you posted.

sukster commented 2 years ago

There is now a pull request to address this issue: https://github.com/clong/DetectionLab/pull/776. Please let me know if you still experience issues with sysprep. Thanks.

sukster commented 2 years ago

The pull request has now been merged to master.