What user account would you recommend running the SQL Server Express 2008 services in a development environment?

天大地大妈咪最大 提交于 2019-12-02 15:36:05
Joe Kuemerle

Local System is not recommended, it is an administrator equivalent account and thus can lead to questionable coding that takes advantage of administrator privileges which would not be allowed in a production system since security conscious Admins/DBA's really don't like to run services as admin.

Depending on if the server instance will need to access other domain resources or not should determine which type of low privilege account it should run under.

If it does not need to access any (non-anonymous) domain resources than I normally create a unique local, low privilege account for it to run under in order to gain the additional security benefit of not having multiple services running in the same identity context. Be aware that the Local Service account is not supported for the SQL Server or SQL Server Agent services.

If it does need to access non-anonymous domain resources then you have three options:

  1. Run as Network Service which is also a low privilege account but one that retains the computers network credentials.
  2. Run under a Local Service Account
  3. Run under a custom domain account with low local privileges. One advantage to running under the developers account is that it is easier to attach debuggers to processes in your own identity without compromising security so debugging is easier (since non-Admin accounts do not have the privilege to attach a debugger to another identities process by default). A disadvantage to using another domain account is the overhead of managing those accounts, especially since each service for each developer should ideally have unique credentials so you do not have any leaks if a developer were to leave.

Most of what I tend to do does not require the service to access domain resources so I tend to use unique local low privilege accounts that I manage. I also run exclusively as a non-admin user (and have done so under XP SP2, Server 2003, Vista and Server 2008 with no major problems) so when I have cases where I need the service to access domain resources then I have no worries about using my own domain credentials (plus that way I don't have to worry the network admins about creating/maintaining a bunch of non-production domain identities).

It depends.

  • Local System - Never, it's too high a privilege.
  • Network Service - Perhaps, if you need to connect to network resources, but that's doubtful.
  • Local Service - Probably the best choice, limited privileges, do not unlock network connections
  • Local interactive user? Does it truly need to have login rights, or act as a user?
  • Domain user? Goodness no, not unless you're accessing network drives from within it; if SQL runs amok then an attacker is authenticated against the domain.

MS now has a good article on this: http://msdn.microsoft.com/en-us/library/ms143504(v=sql.105).aspx

They state that Local Service is not allowed for SQL Server Engine. Personally, I use Local System just to avoid issues during development, but in production, best practice is to create a domain level service account with just the permissions it needs to get the job done.

Whatever it wants to use as default. Changing that is just asking for trouble later.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!