Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to setup DC02 system, ansible script throwing error while setting password policy #26

Closed
0xn1k5 opened this issue Jul 30, 2022 · 6 comments

Comments

@0xn1k5
Copy link

0xn1k5 commented Jul 30, 2022

TASK [password_policy : set password policy] *****************************************************************************
fatal: [192.168.56.11]: FAILED! => {"changed": true, "debug": [], "error": [{"category_info": {"activity": "Set-ADDefaultDomainPasswordPolicy", "category": "ResourceUnavailable", "category_id": 21, "reason": "ADServerDownException", "target_name": "WORKGROUP", "target_type": "ADDefaultDomainPasswordPolicy"}, "error_details": null, "exception": {"help_link": null, "hresult": -2146233088, "inner_exception": {"help_link": null, "hresult": -2146233088, "inner_exception": null, "message": "Unable to find a default server with flags: 'Writable | ADWS | ReturnDnsName'.", "source": null, "type": "Microsoft.ActiveDirectory.Management.ADException"}, "message": "Unable to find a default server with Active Directory Web Services running.", "source": "Microsoft.ActiveDirectory.Management", "type": "Microsoft.ActiveDirectory.Management.ADServerDownException"}, "fully_qualified_error_id": "ActiveDirectoryServer:1355,Microsoft.ActiveDirectory.Management.Commands.SetADDefaultDomainPasswordPolicy", "output": "Set-ADDefaultDomainPasswordPolicy : Unable to find a default server with Active Directory Web Services running.\r\nAt line:19 char:1\r\n+ Set-ADDefaultDomainPasswordPolicy -Identity $Domain -AuthType Negotia ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : ResourceUnavailable: (WORKGROUP:ADDefaultDomainPasswordPolicy) \r\n[Set-ADDefaultDomainPasswordPolicy], ADServerDownException\r\n + FullyQualifiedErrorId : \r\nActiveDirectoryServer:1355,Microsoft.ActiveDirectory.Management.Commands.SetADDefaultDomainPasswordPolicy\r\n \r\n", "pipeline_iteration_info": [0, 1], "script_stack_trace": "at , : line 19", "target_object": {"AddedProperties": [], "ComplexityEnabled": null, "LockoutDuration": null, "LockoutObservationWindow": null, "LockoutThreshold": null, "MaxPasswordAge": null, "MinPasswordAge": null, "MinPasswordLength": null, "ModifiedProperties": [], "PasswordHistoryCount": null, "PropertyCount": 0, "PropertyNames": [], "RemovedProperties": [], "ReversibleEncryptionEnabled": null}}], "host_err": "", "host_out": "", "information": [], "output": [], "result": {}, "verbose": [], "warning": []}

PLAY RECAP ***************************************************************************************************************
192.168.56.11 : ok=27 changed=6 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0

@iNoSec2
Copy link

iNoSec2 commented Aug 9, 2022

Did you tried to make the password match the password policy?

@Mayfly277
Copy link
Collaborator

You got the error "ResourceUnavailable". May be the server 192.168.56.11 was to busy at the time of provisioning ? Could you retry the provisioning and see if it fail again ?

@CleverNamesTaken
Copy link

I got the same error. It doesn't apper to be a problem with the provisioning -- I think it is because it isn't yet connected to the sevenkingdoms.local domain.

@CleverNamesTaken
Copy link

The problem was DNS.

I'm trying to set up with WSL and Virtual Box, and I didn't know what to do with the network adapters. Disabling the NAT network adapter and configuring the network adapter on the 192.168.56.0/24 network to use 192.168.56.10 as the DNS server resolved this for me.

@Mayfly277
Copy link
Collaborator

@0xn1k5 you could try to connect to dc02 (192.168.56.11), run a gpupdate as vagrant user and after that relaunch the playbooks.

Mayfly277 added a commit that referenced this issue Oct 3, 2022
Fix trust and dns issues on lab installation (issues/#40 issues/#26)
@Mayfly277
Copy link
Collaborator

remove the nat network during domain installation and trust creation fix the problems. fixed in #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants