I have tried everything I know to do and spent several hours Googling without success. I want to revoke the SHUTDOWN
and CONTROL SERVER
permissions for the login NT AUTHORITY\SYSTEM
.
When I run this
EXECUTE AS LOGIN = 'NT AUTHORITY\SYSTEM'
SELECT * FROM fn_my_permissions(NULL,NULL)
REVERT
…the output is:
Things I have tried:
Deleting the Login entirely,
Executing the following (with the different permissions listed):
USE master;
REVOKE SHUTDOWN FROM "NT AUTHORITY\SYSTEM";
GO
Even after I delete the login, and execute the fn_my_permissions
SP, it still lists the permissions from the image above.
Any help I could get on this would be great.
Best Answer
This should revoke the permissions
Tests
Result
... (34 Results)
Result
Extra info
If you are ever unsure about the syntax, an easy one (in my opinion), is selecting what you need inside of the GUI and then scripting it out using the 'script' button.
For example in this answer, I added the grants for the
CONTROL SERVER
andSHUTDOWN
to the loginNT AUTHORITY\SYSTEM
, Scripted it out, and then removed them in the GUI and scripted them out again to get the revoke statements. I am against executing stuff through the GUI though, since it is easy to overlook things, and it has proven to be buggy.