Skip to content

Commit d652338

Browse files
authored
Updates from editor
1 parent 957ac19 commit d652338

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

support/windows-server/active-directory/cannot-edit-delete-ad-object-error-sam.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Can't edit or delete an AD object and receive errors
3-
description: Helps resolve the issue in which you can't edit or delete an Active Directory (AD) object and receive an error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
4-
ms.date: 03/04/2025
2+
title: Can't Edit or Delete an AD Object and Receive Errors
3+
description: Helps resolve an issue where you can't edit or delete an AD object and receive the error Attribute is owned by SAM or The specified account does not exist.
4+
ms.date: 03/10/2025
55
manager: dcscontentpm
66
audience: itpro
77
ms.topic: troubleshooting
@@ -12,15 +12,15 @@ ms.custom:
1212
---
1313
# Can't edit or delete an AD object and receive error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist"
1414

15-
This article helps resolve the issue in which you can't edit or delete an Active Directory (AD) object and receive an error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
15+
This article helps resolve an issue in which you can't edit or delete an Active Directory (AD) object and receive the error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
1616

17-
You have a user, Managed Service Account (MSA), Group Managed Service Account (gMSA), computer or group object that is in use. When you attempt to delete a security principal from AD, you receive the following Lightweight Directory Access Protocol (LDAP) error:
17+
You have a user, Managed Service Account (MSA), Group Managed Service Account (gMSA), computer, or group object that is in use. When you attempt to delete a security principal from AD, you receive the following Lightweight Directory Access Protocol (LDAP) error:
1818

1919
> Operation failed. Error code: 0x525
2020
The specified account does not exist.
2121
00000525: NameErr: DSID-031A120B, problem 2001 (NO_OBJECT), data 0, best match of
2222

23-
When you retrieve properties of a computer object by using the following cmdlet:
23+
When you retrieve the properties of a computer object by using the following cmdlet:
2424

2525
```PowerShell
2626
get-adcomputer -identity oldcomputer -properties *
@@ -56,11 +56,11 @@ From the output, you notice an attribute excerpt and some key details:
5656
- The `objectCategory` attribute is shown as empty.
5757
- The `sAMAccountType` attribute isn't listed.
5858

59-
When you try to edit the object, this error appears for most of the changes:
59+
When you try to edit the object, this error appears for most changes:
6060

6161
> 0x209a Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM).
6262
63-
When you check the metadata with the distinguished name (DN) get from the preceding output (excerpts of the attribute list) by using the following command, you receive unexpected results:
63+
When you check the metadata with the distinguished name (DN) obtained from the preceding output (excerpts of the attribute list) by using the following command, you receive unexpected results:
6464

6565
```console
6666
repadmin -showobjmeta DC01 "CN=oldcomputer,OU=Disabled,OU=Workstations,DC=contoso,DC=com"
@@ -77,20 +77,20 @@ Here's the interpretation of the metadata:
7777

7878
- The `sAMAccountType` and `objectCategory` attributes
7979
- They're usually set once.
80-
- The version is `2`, and they aren't set at this time. So they were removed during the object deletion, and weren't repopulated during the undeletion.
80+
- The version is `2`, and they aren't set at this time. So, they were removed during the object deletion and weren't repopulated during the undeletion.
8181
- The `isDeleted` attribute
8282
- The version also shows `2`. This means the object was deleted and was undeleted by clearing the attribute.
8383
- If the object was revived using an authoritative restore, the version numbers for all attributes would be higher (the default version increase is 100000).
8484
- The `isRecycled` attribute
85-
- It shows that at least at the time of the undeletion, Active Directory (AD) Recycle Bin wasn't enabled.
86-
- With AD Recycle Bin, the attribute would only be set on a recycled object.
85+
- It shows that at least at the time of the undeletion, the Active Directory (AD) Recycle Bin wasn't enabled.
86+
- When using the AD Recycle Bin, the attribute would only be set on a recycled object.
8787
- Expected behaviors
88-
- If the undeletion worked as expected, the version of `sAMAccountType` and `objectCategory` would be an odd value (for example, `3`)
88+
- If the undeletion worked as expected, the version of `sAMAccountType` and `objectCategory` would be an odd value (for example, `3`).
8989
- The timestamp for these attributes would match or be slightly newer than the timestamp for `IsDeleted`.
9090

9191
## The sAMAccountType and objectCategory attributes aren't added to the object in an undeletion process
9292

93-
The object was deleted and undeleted. Deleted objects don't have the `sAMAccountType` and `objectCategory` attributes. They're added to the object after the undeletion in the normal case. In the problem case, the process fails, leaving the object live without these key attributes. This state of the object is a known problem that can't be reproduced, and the root cause for this sporadic problem hasn't been identified.
93+
The object was deleted and undeleted. Deleted objects don't have the `sAMAccountType` and `objectCategory` attributes. They're added to the object after the undeletion in the normal case. In the problem case, the process fails, leaving the object active without these key attributes. This state of the object is a known problem that can't be reproduced, and the root cause of this sporadic problem hasn't been identified.
9494

9595
## Use the fixupObjectState attribute with LDIFDE to repair the object
9696

@@ -104,14 +104,14 @@ To resolve this issue, use the new facility included in Windows Server 2025 to
104104
> [!NOTE]
105105
> There's also functionality to repair the `LastLogonTimeStamp` attribute. For more information, see [Will update link to the new article for this attribute].
106106
107-
### Step 1: Identify the object name and the globally unique identifier (GUID)
107+
### Step 1: Identify the object name and globally unique identifier (GUID)
108108

109109
For example:
110110

111111
- DN: `cn=brokenuser,ou=bad-users,dc=contoso,dc=com`
112112
- GUID: `cf2b4aca-0e67-47d9-98aa-30a5fe30dc36`
113113

114-
### Step 2: Prepare an LDIFDE import file with the DN string or the GUID-based syntax
114+
### Step 2: Prepare an LDIFDE import file using the DN string or GUID-based syntax
115115

116116
- Use the DN string:
117117

@@ -124,7 +124,7 @@ For example:
124124
```
125125
126126
> [!NOTE]
127-
> The line with only "-" and the empty line are required for a well-formed LDIFDE import file. This example requests to repair both SAM relevant attributes.
127+
> The line with only a hyphen (`-`) and the empty line are required for a well-formed LDIFDE import file. This example requests the repair of both SAM-relevant attributes.
128128
129129
- Use the GUID-based syntax:
130130
@@ -134,7 +134,7 @@ For example:
134134
135135
So, the expression of `fixupObjectState: cn=brokenuser,ou=bad-users,dc=contoso,dc=com:Objectcategory, SamAccountType` becomes `fixupObjectState: <guid=cf2b4aca-0e67-47d9-98aa-30a5fe30dc36>:Objectcategory, SamAccountType`.
136136
137-
To use this syntax with the LDIFDE import file, the text after the first colon needs to be encoded in Base64 format because of the greater-than (>) and less-than (<) signs:
137+
To use this syntax with the LDIFDE import file, you need to encode the text after the first colon in Base64 format because of the greater-than (>) and less-than (<) signs:
138138
139139
```output
140140
fixupObjectState:: PGd1aWQ9Y2YyYjRhY2EtMGU2Ny00N2Q5LTk4YWEtMzBhNWZlMzBkYzM2PjpPYmplY3RjYXRlZ29yeSxTYW1BY2NvdW50VHlwZQ==
@@ -143,7 +143,7 @@ For example:
143143
> [!NOTE]
144144
> The double colon tells LDIFDE that the attribute value is in Base64 format. You can use the [Base64 encoder](https://www.bing.com/search?q=site%3Amicrosoft.com%20base64%20encoder&qs=n&form=QBRE&sp=-1&lq=0&pq=site%3Amicrosoft.com%20base64%20encoder&sc=0-33&sk=&cvid=CE994D44ADFC432CA2D3784CEBB3D934&ghsh=0&ghacc=0&ghpl=) to encode the string directly on the web.
145145
146-
With the Base64 format used, the import file updates the attributes individually:
146+
After using the Base64 format, the import file updates the attributes individually:
147147
148148
- For the `sAMAccountType` attribute:
149149
@@ -165,7 +165,7 @@ For example:
165165
-
166166
```
167167
168-
### Step 3: Repair the object with LDIFDE
168+
### Step 3: Repair the object using LDIFDE
169169
170170
Sign in as an Enterprise Administrator, and import the LDIFDE import file with the following command by specifying the import file name (for example, **repair-user.txt**):
171171
@@ -182,4 +182,4 @@ Then, the `objectCategory` and `sAMAccountType` attributes of the object are rep
182182

183183
### Step 4: Delete the object again
184184

185-
Delete the object again, as the algorithm doesn't ensure the `sAMAccountType` attribute is correct for all cases. SAM allows a deletion with the new state of the object, but other operations with the object might fail. Additionally, the object might miss other crucial attributes for it to function properly.
185+
Delete the object again, as the algorithm doesn't always ensure the `sAMAccountType` attribute is correct. SAM allows the object in the new state to be deleted, but other operations on the object might fail. Additionally, the object might lack other crucial attributes that make it function properly.

0 commit comments

Comments
 (0)