开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜