对 LocalSystem 和 LocalService 帐户感到困惑

发布于 2024-08-02 21:54:54 字数 92 浏览 5 评论 0原文

我是 Windows 服务编程新手。我对编写 Windows 服务时设置帐户类型的内容感到困惑。

在编写服务时如何选择或如何确定我们需要设置哪种帐户类型?

I am new to windows services programming. I have confusion about what to set the Account type while writing a windows services.

How to choose or how to determine to which account type we need to set while writing a service?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不忘初心 2024-08-09 21:54:54

我们通常创建特殊的窗口(本地用于仅本地访问或域帐户用于需要跨网络进行身份验证的事物)帐户来运行自定义服务。这样我们就可以限制和锁定权限,以确保它只能访问我们需要的内容。您还可以通过共享服务器上的监控来查看哪些特定用户是罪魁祸首或资源占用者。

至于内置帐户...

Local System:
内置LocalSystem用户帐户具有高级别的访问权限;它是管理员组的一部分。
Network Service:
内置网络服务用户帐户对系统的访问权限比本地系统用户帐户少,但网络服务用户帐户仍然能够使用计算机帐户的凭据在整个网络中进行交互。
Local Service:
内置本地服务用户帐户在计算机上的访问权限少于网络服务用户帐户,并且这些用户权限仅限于本地计算机。如果工作进程不需要访问其运行的服务器外部,请使用本地服务用户帐户。

来源:
微软技术网

We generally create special windows (local for local only access or domain account for things that need to authenticate accross the network) accounts to run custom services. This way we can restrict and lock down the permissions to make sure it only has access to what we need. You can also see which specific users are culprits or resource hogging with monitoring on a shared server.

As for the built in accounts...

Local System:
The built-in LocalSystem user account has a high level of access privileges; it is part of the Administrators group.
Network Service:
The built-in Network Service user account has fewer access privileges on the system than the LocalSystem user account, but the Network Service user account is still able to interact throughout the network with the credentials of the computer account.
Local Service:
The built-in Local Service user account has fewer access privileges on the computer than the Network Service user account, and those user privileges are limited to the local computer. Use the Local Service user account if the worker process does not require access outside the server on which it is running.

Source(s):
Microsoft Technet

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文