dc01: make the delegated ACL the only way out, and stabilise the state
Three shortcuts and one race made the lab either easier than documented or non-deterministic: - Serveurs-Admins was nested in BUILTIN\Administrators on the DC, so m.legault was a de-facto domain-controller admin (C$, NTDS.dit) and the whole ACL lesson could be skipped. It also made SDProp treat her as protected: an hour after provisioning, the intended GenericAll ACE was wiped. Removed the nesting; adminCount is explicitly reset. - the t.smith decoy ACE gave a working path to Domain Admin until SDProp ran (up to an hour after a fresh build). The role now grants it and revokes it immediately, so the state is deterministic. - the replication-rights grant stacked duplicate ACEs on every re-run; it now removes its own ACEs first. - up/reset/save returned as soon as WinRM answered, while the directory was still starting; doctor right after could report a missing ACE and missing replication rights on a healthy lab. They now wait for Get-ADDomain on dc01. doctor: a decoy ACE that is still present is now a failure, not a success. The deck's wording matches the new behaviour.
This commit is contained in:
@@ -131,8 +131,8 @@ $plainAcl = Get-Acl ("AD:\" + (Get-ADUser m.legault).DistinguishedName)
|
||||
while IFS='=' read -r key value; do
|
||||
value=${value//$'\r'/}
|
||||
case $key in
|
||||
ace) if [[ $value -ge 1 ]]; then _d_ok "delegated right: svc_backup has an ACE on t.smith (decoy)"
|
||||
else _d_warn "decoy ACE on t.smith reverted by SDProp (expected)"; fi ;;
|
||||
ace) if [[ $value -ge 1 ]]; then _d_fail "decoy ACE still on t.smith — a Domain Admin shortcut until SDProp runs"
|
||||
else _d_ok "decoy ACE absent on t.smith (protected object, as designed)"; fi ;;
|
||||
ace_plain) if [[ $value -ge 1 ]]; then _d_ok "stable path: svc_backup has an ACE on m.legault"
|
||||
else _d_fail "stable path missing (ACE on m.legault)"; fi ;;
|
||||
plain_enabled) if [[ $value == True ]]; then _d_ok "m.legault account enabled"
|
||||
|
||||
Reference in New Issue
Block a user