sql-servercmdpermissionssystem-administrationxp-cmdshell

permission sp_xp_cmdshell_proxy_account for more than one user who needs to run xp_cmdshell without a sysadmin


I created a proxy account that xp_cmdshell will run using sp_xp_cmdshell_proxy_account And I gave one user permission

EXEC sp_xp_cmdshell_proxy_account 'Domain\user1'

If I give another user too

EXEC sp_xp_cmdshell_proxy_account 'Domain\user2'

I saw that only one had permission - the last user - user2

select * From sys.credentials

Does it override the previous user's permission?


Solution

  • sp_xp_cmdshell_proxy_account does not "give user permissions". This stored procedure specifies the OS security context (proxy account) all non-sysadmin role members that execute xp_cmdshell. The SQL Server service account is used when sysadmin role members execute xp_cmdshell