Does LastLogonTimestamp Update for Service Accounts?

0
11
Asked By TechWhisper3r On

In an Active Directory environment, if I set up a Windows service on a domain member computer to run under an Active Directory user account (commonly known as a service account) and that service remains running without any reboots or restarts for an entire year, will the LastLogonTimestamp for that service account's user object keep updating? For example, I'm using the MSSQL Engine service that runs as contososql-service. I'm curious about how the LastLogonTimestamp behaves in this scenario.

4 Answers

Answered By NetAdminSage On

Nope, LastLogonTimestamp only updates when there are actual logon events. It's intended to help identify stale accounts and is only updated during authentication, with an accuracy within approximately 14 days. So just running the service won’t extend or change the timestamp.

TechWhisper3r -

Got it! So I'd need to restart something for the timestamp to budge?

Answered By SysAdminGuru On

I don't think the LastLogonTimestamp would change unless you restart the server that's running the service under that account.

Answered By ServerNinja42 On

Not likely. Instead, you might want to look into using a gMSA (Group Managed Service Account) for better management.

TechWhisper3r -

Thanks for the suggestion! I'll check out gMSAs.

Answered By ITTroubleshooter On

You're correct, the LastLogonTimestamp remains static unless there's a logon event. I monitored a service account and found that even a TGT Renewal doesn’t update the LastLogonTimestamp. Plus, while this timestamp is replicated, it has a 14-day delta, so for the most precise information, you’d have to check each Domain Controller individually.

TechWhisper3r -

Thanks for clarifying! So it really is tied to logon events only.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.