July 27, 2010 at 2:08 am
I have the XP_cmdshell issues for the past two days in SQL2005 SP2 environment. There is a domain account with sysadmin privilege. I have created a proxy account and gave the execute privilege for xp_cmdshell.
If i try to run the following commmand
EXEC master..xp_cmdshell 'dir *.txt'
Msg 15121, Level 16, State 10, Procedure xp_cmdshell, Line 1
An error occurred during the execution of xp_cmdshell. A call to 'CreateProcessAsUser' failed with error code: '1314'.
But if i give sysadmin priv and then i try to execute. It worked. I cant give sysadmin priv so i m using a proxy account.
Whether any one have solution for it.
July 27, 2010 at 3:33 am
Did you use sp_xp_cmdshell_proxy_account as explained here?
Also you may find this article useful.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
July 27, 2010 at 4:10 am
yes i used it.
July 28, 2010 at 2:07 am
Do anyone have solution for this issue.
November 23, 2010 at 12:33 pm
Yes :
RDP to the server:
1. Under local group policy in user rights assignments, you will have to assign service account to
these privileges:
Act as part of the operating system
Adjust memory quotas for a process
Impersonate a client after authentication
Lock pages in memory
Log on as a batch job
Log on as a service
Replace a process level token
2. Restart the entire server.
3. set up proxy account for for xp_cmdshell.
sp_xp_cmdshell_proxy_account 'service account' ,'password'
4. Grant the user execute permission who wants to use xp_cmdshell.
grant execute to "USER" on xp_cmdshell.
March 22, 2016 at 8:51 am
Hello,
I have sql server and agent running under account called 'domain\service'.
With this account I can execute xp_cmsdhell from SSMS.
Does that mean this account has all those 7 listed privileges under local group policy???
I think answer is yes and thats why I can execute xp_cmsdhell from SSMS.
But then I have done step-3 and 4 above and I am still getting issues.WHY???
Does that mean I have to check all those 7 privileges for 'domain\service', add if missing and restart server??
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply