Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


XP_cmdshell error.


XP_cmdshell error.

Author
Message
JMSM
JMSM
SSC Veteran
SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)

Group: General Forum Members
Points: 272 Visits: 972
Hello,

Can you tell me how can i give permissions for the execution of the xp_cmdshell to one user without give the sysadmin permission. This problem appears because theres an apicatioon(app user) that needs to execute some operating system task but i cant give this privilege to users.

I give the grant execution on the xp_cmdshell but it gives me the following error.

Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1
The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information.
(0 row(s) affected)

Thanks and regards.
jmsmWink

Andras Belokosztolszki
Andras Belokosztolszki
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1553 Visits: 1585
JMSM (1/30/2008)
Hello,

Can you tell me how can i give permissions for the execution of the xp_cmdshell to one user without give the sysadmin permission. This problem appears because theres an apicatioon(app user) that needs to execute some operating system task but i cant give this privilege to users.

I give the grant execution on the xp_cmdshell but it gives me the following error.

Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1
The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information.
(0 row(s) affected)

Thanks and regards.
jmsmWink


If the user is not in the sysadmin role SQL Server will need to you need use a proxy account. You can set this up using sp_xp_cmdshell_proxy_account (see http://msdn2.microsoft.com/en-us/library/ms190359.aspx)
Regards,
Andras



Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
sunshine-587009
sunshine-587009
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 1273
I've tried this and users still get the following error.

Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1

the xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information.

Any idea what else it could be?

¤ §unshine ¤
Mohan Kumar
Mohan  Kumar
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1383 Visits: 596
are you sure you specified valid account? did you follow syntax shown below to create account?:
EXEC sp_xp_cmdshell_proxy_account 'MyDomain\MyUserName', 'myDomainPassword'

--www.sqlvillage.com
sunshine-587009
sunshine-587009
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 1273
Yes, however it is a windows user id and i did not enter a password. Is that incorrect?

¤ §unshine ¤
Mohan Kumar
Mohan  Kumar
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1383 Visits: 596
yes, you should enter password while creating it.

--www.sqlvillage.com
sunshine-587009
sunshine-587009
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 1273
Any password? I used a group windows authenticated account. all developers can access everything via this account rather than being individually assigned security. Less maintenance.

¤ §unshine ¤
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (7.4K reputation)

Group: Moderators
Points: 7430 Visits: 1917
You must put the correct password for the Windows account you've specified will be the proxy account. And yes, when a non-Sysadmin runs xp_cmdshell, xp_cmdshell will execute as this Windows account and only this Windows account. So be careful with respect to what rights it has.

K. Brian Kelley
@‌kbriankelley
sunshine-587009
sunshine-587009
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 1273
ok. I'll have to talk to whoever setup this account. They just all log in with their individual windows account and have access.
thanks!

¤ §unshine ¤
sunshine-587009
sunshine-587009
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 1273
I have one of the network guys looking into a password for this account, however i find it weird that they can see legacy dts packages and schedule and run scheduled jobs.

¤ §unshine ¤
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search