Admin Login

Delegate Password Reset and Unlock in Active Directory (Without Domain Admins)

Least privilege for a self-service password reset service account, OU delegation with dsacls, the effect of AdminSDHolder, and a checklist.

Self-service password reset software uses a service account to change passwords and unlock accounts in Active Directory. The most common installation mistake is adding that account to Domain Admins. The installation is quick and everything works on the first try.

The problem: a password reset portal is usually one of the most widely reached internal applications, and sometimes it faces the internet. Whoever takes over the portal acts with the service account's rights. If the service account is in Domain Admins, that means taking over the whole domain.

What does the service account actually need?

An SSPR tool does a narrow job. It needs only these rights, and only on the target users:

Operation Required right
Password reset "Reset Password" extended right
Account unlock Write the lockoutTime attribute
"Change password at next logon" Write the pwdLastSet attribute
Enable / disable account (optional) Write userAccountControl
Update phone number (optional) Write the phone attribute (e.g. mobile)

Reading users and phone numbers needs no extra rights; authenticated accounts in the domain can read them by default.

How to delegate

The rights are granted on the OU in self-service scope, not on the domain root. Use the "Delegate Control" wizard in Active Directory Users and Computers, or dsacls:

$ou  = "OU=Staff,DC=company,DC=local"
$svc = "COMPANY\press.service"

dsacls $ou /I:S /G "${svc}:CA;Reset Password;user"
dsacls $ou /I:S /G "${svc}:WP;lockoutTime;user"
dsacls $ou /I:S /G "${svc}:WP;pwdLastSet;user"

/I:S applies the right to the user objects below the OU rather than to the OU itself.

Why privileged accounts are protected automatically

Members of Domain Admins, Enterprise Admins and other protected groups are covered by the AdminSDHolder mechanism. Inheritance is disabled on these accounts and their permissions are regularly reset to the AdminSDHolder template.

As a result, delegation on the OU does not apply to them. Even if the portal is taken over, the service account cannot change a domain administrator's password. This is a second, directory-level barrier on top of the software's own "reject privileged accounts" rule.

When the service account is itself in Domain Admins, that barrier disappears.

Two group memberships that are often missed

  • Windows Authorization Access Group: to check whether a user is in a privileged group, the software reads group memberships (tokenGroups). If it cannot, well-designed software refuses the operation for safety, and you end up with "nobody can reset their password".
  • Event Log Readers: showing which device locked an account requires reading event 4740 on the domain controller.

When delegation does not work

If "access denied" appears even though the rights were granted, the usual causes are:

  • The user is, or used to be, in a protected group. AdminSDHolder disables permission inheritance on these accounts. For accounts removed from the group, adminCount stays at 1 and inheritance is not turned back on automatically. If "Enable inheritance" is off in the user's Security > Advanced tab, this is why.
  • The user object is not under the OU. Delegation only applies to that OU and the objects below it; users in another OU or in the CN=Users container are not affected.
  • Only "Reset Password" was granted. The password changes but the account cannot be unlocked; unlocking also needs write access to lockoutTime.
  • The change has not reached every domain controller yet. Permission changes travel by replication; with multiple sites it can take a few minutes.

You can confirm the effective permissions in the user object's Security > Advanced > Effective Access tab by selecting the service account.

Checklist

  1. The service account is not in Domain Admins, Administrators, Account Operators or other privileged groups.
  2. Rights are delegated only on the OU in self-service scope.
  3. The account's password is long and random, set not to expire, and kept in a password vault.
  4. The account cannot sign in interactively ("Deny log on locally" and "Deny log on through Remote Desktop Services").
  5. Failed sign-ins for the account are monitored in the SIEM.

The service account in PRESS

The Grant-PressDelegation.ps1 script shipped with the PRESS installation package delegates the rights above on the target OU only, adds the required group memberships, and warns if the service account is in a privileged group. Run with -WhatIf, it lists what it would do without changing anything.

The Readiness Check page in the admin panel checks the service account's group memberships, and the dashboard shows a red warning if the account is privileged. PRESS also rejects accounts in privileged groups in both the self-service portal and the admin panel.

See the readiness check in the live demo

Evaluate PRESS in your own environment.

Through the live demo you can explore the user portal and the admin panel directly.