Hi everyone
Today I wanted to talk a change that Microsoft did for domain join.
After the 11 October 2022 the KB5020276 introduce some concept change that will help a lot to make domain join error free.
I will quote the legacy behavior;
Before you install the October 11, 2022, or later cumulative updates, the client computer queries Active Directory for an existing account with the same name. This query occurs during domain join and computer account provisioning. If such an account exists, the client will automatically attempt to reuse it.
Note The reuse attempt will fail if the user who attempts the domain join operation does not have the appropriate write permissions. However, if the user has enough permissions the domain join will succeed.
There are two scenarios for domain join with respective default behaviors and flags as follows:
Domain Join (NetJoinDomain)
Defaults to account reuse (unless NETSETUP_NO_ACCT_REUSE flag is specified)
Account provisioning (NetProvisionComputerAccountNetCreateProvisioningPackage).
Defaults to NO reuse (unless NETSETUP_PROVISION_REUSE_ACCOUNT is specified.)
After the change there is an addional security check that is done.
- Account reuse will be permitted if done by the account creator.
- Account reuse will be permitted if done by a member of the domain admin's group.
That way if you have delegated the domain join task it enforce more security for account name.
Following that change you can see that error message; which would be normal if the two conditions are not met.
Error 0xaac (2732): NERR_AccountReuseBlockedByPolicy: “An account with the same name exists in Active Directory. Re-using the account was blocked by security policy.”
Some more information on additional's step that can be done;
Take Action
Review computer account provisioning workflows and understand if changes are required.Perform the join operation using the same account that created the computer account in the target domain.
If the existing account is stale (unused), delete it before attempting to join the domain again.
Rename the computer and join using a different account that doesn’t already exist.
If the existing account is owned by a trusted security principal and an administrator wants to reuse the account, they might do so by temporarily setting the following registry key at the individual client computer level. Then immediately remove the registry setting after the join operation is complete. No restart is necessary for changes to the registry key to take effect.
Path
HKLM\System\CurrentControlSet\Control\LSA
Type
REG_DWORD
Name
NetJoinLegacyAccountReuse
Value
1
Other values are ignored.
Important guidance for using option 4
Caution: If you choose to set this key to work around these protections, you will leave your environment vulnerable to CVE-2022-38042 unless your scenario is referenced below as appropriate. Do not use this method without confirmation that the Creator/Owner of the existing computer object is a secure and trusted security principal.It is appropriate to use solution 4 in the following scenarios:
An IT admin with delegated permissions needs to rejoin a computer to the target domain for troubleshooting purposes and the original account creator is a trusted account.
OR
A deployment scenario in which computer accounts are created before using a dedicated service account (such as SCCM or other software) and the domain join is performed by a second dedicated account with delegated domain-join permissions (for example, "This account is allowed to join this computer to the domain").
Microsoft might remove support for the NetJoinLegacyAccountReuse registry setting in a future update and replace it with an alternative method. This article will be updated if and when such changes take place.
Nonsolutions
Do not add service accounts or provisioning accounts to the Domain Admins security group.Do not manually edit the security descriptor on computer accounts in an attempt to redefine the ownership of such accounts. While editing the owner will enable the new checks to succeed, the computer account might retain the same potentially risky, unwanted permissions for the original owner unless explicitly reviewed and removed.
Do not add the NetJoinLegacyAccountReuse registry key to base OS images because the key should only be temporarily added and then removed directly after the domain join completes.
The article in reference is; KB5020276—Netjoin: Domain join hardening changes
Popular Tags
Archives
-
2026 (23)
- November 2026 (3)
-
October 2026
(15)
- Blog content imported
- Added language; Hindi
- Added more contents for Polish
- App Review: Go Talk Now
- New language added; portuguese
- Website hardened for external link
- New spam for App Developper
- Website maintenance
- Tech Tip: Meraki firewall possible parental control
- New apps release for Android
- Router review - Sophos UTM
- Tech Tip: ASUS parental's control for home router
- Tech Tip: Amazon Fire Tablet Parental's control
- Youtube Restriced Mode
- 100K visit Milestone achieved !
- September 2026 (3)
- August 2026 (2)
- 2024 (4)
-
2023 (19)
- December 2023 (2)
- October 2023 (6)
- September 2023 (2)
- July 2023 (1)
- June 2023 (1)
- May 2023 (2)
- April 2023 (1)
- February 2023 (2)
- January 2023 (2)
-
2022 (26)
- December 2022 (3)
- November 2022 (5)
- October 2022 (4)
- September 2022 (2)
- July 2022 (2)
- May 2022 (1)
- March 2022 (1)
- February 2022 (4)
- January 2022 (4)
-
2021 (15)
- December 2021 (4)
- November 2021 (1)
- October 2021 (2)
- September 2021 (1)
- August 2021 (1)
- May 2021 (1)
- April 2021 (1)
- February 2021 (1)
- January 2021 (3)
-
2020 (18)
- December 2020 (2)
- November 2020 (1)
- October 2020 (2)
- September 2020 (2)
- August 2020 (1)
- July 2020 (1)
- March 2020 (1)
- February 2020 (2)
-
January 2020
(6)
- Windows 10 IoT Terminal Deployment – Part 4 – Apps Publishing (HPDM - HP Device Manager)
- Windows 10 IoT Terminal Deployment - Part 2 - Protect the Hard Disk ? - Deploy Write Filter !
- Office 2019 / 365 Deployment
- Windows 10 IoT Terminal Deployment - Part 1 - Introduction
- Microsoft Team support for CentOS 7 / RedHat
- Prevent Office from saving to OneDrive by default
-
2019 (29)
- December 2019 (3)
- November 2019 (3)
-
October 2019
(8)
- Microsoft Q&A Launch !
- Windows Server 2019 OEM Activation problem (VM)
- StackOverflow moderation
- Microsoft Exchange Information Store Error - EventID 5003 | EventID 3154 - Time error
- Windows 10 - Update Stay at Download Waiting
- Windows Server 2019 Domain Controller - Ready for production ! (KB4516077)
- 0365 - Exchange Online X-Sender Spam Problem
- Active-Directory - Invoke-InternalEnsureADDSComponentInstallState not recognized - DCPromo
- September 2019 (1)
- August 2019 (1)
- July 2019 (2)
- April 2019 (1)
- March 2019 (1)
-
February 2019
(7)
- RDS: HP Thin OS resolution problem in Full Screen mode !
- Unable to rename domain controller: Account already exists
- Windows Update Error 80243004
- Windows 10 and the faulty network adapter
- Windows Server 2019 RDS: Install Error: dismapi_error__failed_to_enable_updates rds-web-access
- Windows Machine Unknown state on ESX
- RDS: Published App + Dell / Wyse ThinOS + Juniper DHCP relay option
- January 2019 (2)
-
2018 (28)
- December 2018 (1)
- November 2018 (6)
- October 2018 (1)
- September 2018 (2)
- August 2018 (4)
- July 2018 (2)
- May 2018 (1)
-
March 2018
(7)
- Windows 7/10 + Terminal + SmartCard Redirection with XenDesktop
- Windows 7/10, vSphere 5.5+, Citrix Desktop Studio Power State Unknown
- Logon Failure: The target account name is incorrect
- DNS Server Service - Error 1717: The interface is unknown
- Migrating files from an Active Directory Domain to another, unblocking the files ?
- Active Directory: Reset the clock on an expired password for an account
- OneDrive on Local Account ?
- February 2018 (2)
- January 2018 (2)
-
2017 (18)
- December 2017 (1)
- October 2017 (1)
- September 2017 (3)
- August 2017 (3)
- July 2017 (3)
- June 2017 (6)
- April 2017 (1)
-
2016 (26)
-
October 2016
(24)
- Windows Server - Prevent users from changing printer preferences for color
- Windows Server 2012 R2 - Firewall Logging for RDP (or any other service!)
- Windows VDA - Script to re-install the Microsoft Update add-on
- Windows VDA / Terminal Server session - Kill for good that Java update Warning !
- The Citrix purge ! part 1
- Windows - Outgoing Fax in the Console
- SQL Server 2014 on a Domain Controller ?
- Windows VDA + Pre Deploy Juniper client / Pulse Secure
- How to add non latin entry in the Windows Host file ? (%SystemRoot%\System32\drivers\etc\hosts)
- Windows Remote Desktop Service - Manually creating a .RDP file
- Microsoft Office 2013 32-bit over 64-bit error
- Windows - How to easily deploy XenApp multiple farm config for a user
- Windows Server 2012 R2 KB3185279 & KB3185331 seem to break Google tip to block Youtube with DNS
- Microsoft Offer some Virtual Machine for testing purpose
- In Windows Server 2012 R2, and error copying file name too long ?
- Windows Server - Stress that spooler ! - The terminal Server session will love you after
- Windows/Linux/BSD - How to check if the memory is functioning in ECC mode
- PowerShell - RDS - XenApp - Force password change for account near passoword expiration date
- Temporary file from UsrClass.dat (sometime associated with NTUSER.dat)
- How to export Event Viewer data to Excel with PowerShell
- Visual Studio 2015 on Windows Server 2012 R2
- Remove any trace of an Antivirus was installed (WMI)
- Windows VDA + Roaming Profile + OTP program
- Windows VDA – KMS problem - Resetting rearm count
- September 2016 (1)
- June 2016 (1)
-
October 2016
(24)
- 2015 (2)
-
2014 (5)
- November 2014 (3)
- March 2014 (1)
- January 2014 (1)
-
2013 (10)
- November 2013 (2)
- October 2013 (1)
- August 2013 (3)
- May 2013 (2)
- February 2013 (2)
- 2012 (2)
-
2011 (7)
-
June 2011
(7)
- The hypervisor was not contactable at the supplied address
- Wyse Xenith FTP bug from old firmware.. (post 1.5.xx)
- Messaging between Desktop in XenDesktop
- Unknown publisher.. small annoyance
- Best Practices for Configuring Provisioning Server on a Network
- Citrix XenDesktop and McAfee EPO script
- How to cold reset an APC ups
-
June 2011
(7)
- 2010 (2)