How to check a service account is built-in network service account?
I need to check if service account in the form of (xxx\yyy$) is an built-in network service account. One way I'm thinking is compare account name with "domainName\hostname$", it's networkservice account if equals; otherwise not.
I believe there's some simple API (C/C++) ca开发者_如何学Gon help me. Anybody know it?
You need to compare the actual SID. The sids of these well-known users are declared.
See this page at Microsoft, where you will find:
SID: S-1-5-20
Name: NT Authority
Description: Network Service
精彩评论