0

A custom service which runs as Local System on a Windows Server 2003 server needs to login to a database running on a local instance of SQL Server 2005. SQL Server services runs as Network Services, so actually database login is not allowed for NT AUTHORITY\SYSTEM. Please note that NT AUTHORITY\SYSTEM has already sysadmin Server role.

How do I grant database login permission to the NT AUTHORITY\SYSTEM user on a local SQL Server 2005 Express when it do not run as Local System?

2 Answers 2

3

Your best option is to run the service as something other than Local System and explicitly grant the required SQL permissions to that service account.

Another (less desirable) option is to use SQL authentication from the service.

2
  • Changing the service user is an option and probably it should work but I am interested in understand why Local System can't login to databases also if it has sysadmin role and how to fix this Dec 14, 2011 at 9:17
  • @danillo-brambilla Do you get any events in the application, security, or SQL logs when the service tries to authenticate? How does the service connect to SQL server (integrated auth, sql auth)?
    – JeffM
    Dec 14, 2011 at 19:49
0

I've seen similar issues crop up, albeit not for SQL server.

Instead of granting the NT AUTHORITY\SYSTEM account access try using COMPUTERNAME$. Depending on how the service is running it is possible to see the user rendered in both fashions.

1
  • I'll have a try but I really do not like to set permissions to COMPUTERNAME$ Dec 14, 2011 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .