You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/windows-server/active-directory/accounts-lastlogontimestamp-future-time.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Accounts have the lastLogonTimestamp value set to future
3
-
description: Helps resolve the issue in which user or computer accounts have the lastLogonTimestamp value set to a future time.
4
-
ms.date: 03/05/2025
2
+
title: Accounts Have the LastLogonTimestamp Value Set to Future
3
+
description: Helps resolve an issue in which user or computer accounts have the lastLogonTimestamp value set to a future time.
4
+
ms.date: 03/07/2025
5
5
manager: dcscontentpm
6
6
audience: itpro
7
7
ms.topic: troubleshooting
@@ -12,23 +12,23 @@ ms.custom:
12
12
---
13
13
# User or computer accounts have the lastLogonTimestamp value set to a future time
14
14
15
-
This article helps resolve the issue in which user or computer accounts have the lastLogonTimestamp value set to a future time.
15
+
This article helps resolve an issue in which user or computer accounts have the lastLogonTimestamp value set to a future time.
16
16
17
-
You have an Active Directory (AD) domain and use AD queries to look for unused accounts. You query attributes like `pwdLastSet` and `lastLogonTimestamp` to determine which accounts are no longer in use.
17
+
You have an Active Directory (AD) domain and use AD queries to look for unused accounts. You query attributes like `pwdLastSet` and `lastLogonTimestamp` to determine which accounts are no longer used.
18
18
19
19
Although using `lastLogonTimestamp` has its limitations due to Kerberos S4U updating the attribute, you notice that some actively used accounts have the `lastLogonTimestamp` value set to a future time.
20
20
21
-
## Incorrect time on local DC
21
+
## Incorrect time on the local DC
22
22
23
-
A domain controller (DC) might run with its system time set in the future. In this situation, if a user authenticates with the DC, the DC compares its local time with the time stored on the user account. Then, the DC updates the `lastLogonTimestamp` value as its current time is much newer.
23
+
A domain controller (DC) might run with its system time set in the future. In this situation, if a user authenticates with the DC, the DC compares its local time with the time stored in the user account. Then, the DC updates the `lastLogonTimestamp` value as its current time is much more recent.
24
24
25
-
The time on the DC might be incorrect due to a problem with time synchronization from the virtual machine (VM) host, the Network Time Protocol (NTP) infrastructure, or [Secure Time Seeding (STS)](https://techcommunity.microsoft.com/blog/askds/secure-time-seeding-on-dcs-a-note-from-the-field/4238810). The DC might also revert to the correct time quickly, so you might not catch the problem in your reporting.
25
+
The time on the DC might be incorrect due to a time synchronization issue with the virtual machine (VM) host, the Network Time Protocol (NTP) infrastructure, or [Secure Time Seeding (STS)](https://techcommunity.microsoft.com/blog/askds/secure-time-seeding-on-dcs-a-note-from-the-field/4238810). The DC might also revert to the correct time quickly, so you might not catch the problem in your reporting.
26
26
27
-
As NTP prevents large time-offsets between DCs from being distributed across the domain, incorrect time-stamps might be kept local to one single DC. However, domain members follow their local DC' time, even when the DC detects a time skew during Kerberos requests. This is why Kerberos transactions still work in this situation.
27
+
As NTP prevents large timeoffsets between DCs from being distributed across the domain, incorrect timestamps might be kept local to a single DC. However, domain members follow their local DC's time, even when the DC detects a time skew during Kerberos requests. This is why Kerberos transactions still work in this situation.
28
28
29
29
## Use the fixupObjectState attribute with LDIFDE to repair the object
30
30
31
-
For previous versions of Windows, the only approaches to resolve the issue are:
31
+
For previous versions of Windows, the approaches to resolve the issue are to:
32
32
33
33
- Wait until the actual time surpasses the `lastLogonTimestamp` value of the user.
34
34
- Ignore the `lastLogonTimestamp` value and use other metrics to identify orphaned accounts.
@@ -39,14 +39,14 @@ In Windows Server 2025, there's a new facility to repair broken objects as speci
39
39
> [!NOTE]
40
40
> There's functionality to correct missing `sAMAccountType` and `objectCategory` attributes. For more information, see [Will add link when new article releases].
41
41
42
-
### Step 1: Identify the object name and the globally unique identifier (GUID)
42
+
### Step 1: Identify the object name and globally unique identifier (GUID)
-Distinguished name (DN): `cn=brokenuser,ou=bad-users,dc=contoso,dc=com`
47
47
- GUID: `cf2b4aca-0e67-47d9-98aa-30a5fe30dc36`
48
48
49
-
### Step 2: Prepare an LDIFDE import file with the DN string or the GUID-based syntax
49
+
### Step 2: Prepare an LDIFDE import file using the DN string or GUID-based syntax
50
50
51
51
- Use the DN string:
52
52
@@ -59,7 +59,7 @@ For example:
59
59
```
60
60
61
61
> [!NOTE]
62
-
> The line with only "-" and the empty line are required for a well-formed LDIFDE import file.
62
+
> The line with only a hyphen (`-`) and the empty line are required for a well-formed LDIFDE import file.
63
63
64
64
- Use the GUID-based syntax:
65
65
@@ -69,7 +69,7 @@ For example:
69
69
70
70
So, the expression of `fixupObjectState: cn=brokenuser,ou=bad-users,dc=contoso,dc=com:LastLogonTimestamp` becomes `fixupObjectState: <guid=cf2b4aca-0e67-47d9-98aa-30a5fe30dc36>:LastLogonTimestamp`.
71
71
72
-
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:
72
+
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:
> The double colon shows 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.
80
80
81
-
With the Base64 format used, the import file becomes:
81
+
After using the Base64 format, the import file becomes:
82
82
83
83
```output
84
84
DN:
@@ -88,7 +88,7 @@ For example:
88
88
-
89
89
```
90
90
91
-
### Step 3: Repair the object with LDIFDE
91
+
### Step 3: Repair the object using LDIFDE
92
92
93
93
Sign in as an Enterprise Administrator, and import the LDIFDE import file (for example, **repair-user.txt**) with the following command:
94
94
@@ -107,5 +107,5 @@ Then, the object has the `lastLogonTimestamp` attribute value set to the current
107
107
108
108
For more information about the usage of the `lastLogonTimestamp` attribute, see:
109
109
110
-
-["The LastLogonTimeStamp Attribute" – "What it was designed for and how it works"](/archive/blogs/askds/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works)
110
+
-["The LastLogonTimeStamp Attribute" - "What it was designed for and how it works"](/archive/blogs/askds/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works)
111
111
-[How LastLogonTimeStamp is Updated with Kerberos S4u2Self](https://techcommunity.microsoft.com/blog/coreinfrastructureandsecurityblog/how-lastlogontimestamp-is-updated-with-kerberos-s4u2self/257135)
0 commit comments