Fix the ACL being reverted by SDProp, and make doctor check the puzzle
t.smith is a Domain Admin, therefore a protected object: SDProp rewrites his security descriptor every hour from AdminSDHolder and deletes any ACE not present there. The GenericAll that the lab builds was silently removed by that cycle, so 'bloodyad set password' started failing with the misleading 'oldpass not valid' error. Clearing adminCount on the target takes it out of SDProp's scope while it stays a Domain Admin. Applied in dc01-post.ps1 (guarded) and baked into the baseline. doctor now verifies the invariants that services do not reveal: the ACE, adminCount, SPN, disabled pre-auth, minimum password age, root.txt, the easter-egg TXT and the DHCP scope. This is exactly the drift that was invisible before.
This commit is contained in:
@@ -95,6 +95,17 @@ try {
|
||||
Write-LabLog 'dc01: svc_backup already has an ACE on t.smith'
|
||||
}
|
||||
|
||||
# t.smith is a Domain Admin, therefore a "protected" object: SDProp resets
|
||||
# his security descriptor every hour and deletes any ACE not present in
|
||||
# AdminSDHolder. Clearing adminCount takes him out of SDProp's scope while
|
||||
# leaving his Domain Admins membership intact.
|
||||
try {
|
||||
Set-ADObject -Identity 't.smith' -Replace @{ adminCount = 0 } -ErrorAction Stop
|
||||
Write-LabLog 'dc01: t.smith excluded from SDProp (adminCount=0)'
|
||||
} catch {
|
||||
Write-LabLog "dc01: could not clear adminCount ($($_.Exception.Message))"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------ dns
|
||||
try {
|
||||
Add-DnsServerResourceRecordA -Name 'www' -ZoneName '@@DOMAIN@@' -IPv4Address '10.10.10.20' -ErrorAction Stop
|
||||
|
||||
Reference in New Issue
Block a user