SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Grant.... with admin option..... (xp_cmdshell)


Grant.... with admin option..... (xp_cmdshell)

Author
Message
JMSM
JMSM
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1086 Visits: 979
Hello,

I'd like to know how can i give grant to a specific user to execute xp_cmdshell.
This user as one stored procedure that invoques the xp_cmdshell, we cant give him sysadmin privs so:
- Can i give this user one specific grant to execute this extended stored procedure?
- Can i become the owner of that stored procedure and give him privileges to execute the SP?
- Should i use any other option like create the same process with the use of one DTS or anyother option?

Thanks and regards
JMSMWink
Andras Belokosztolszki
Andras Belokosztolszki
SSCertifiable
SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

Group: General Forum Members
Points: 5251 Visits: 1585
You can enable not sysadmin users to run xp_cmdshell by setting up a proxy account See: http://technet.microsoft.com/en-us/library/ms175046.aspx

Permission wise it will need CONTROL SERVER, so if this is not acceptable, you may want to wrap it into a stored procedure with execute as dbo or a user that has the relevant permissions.

Andras



Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
JMSM
JMSM
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1086 Visits: 979
Hello,

The point is that i've that account created but i dont know how to use it to permite other users to execute xp_cmdshell

Regards
JMSM
free_mascot
free_mascot
SSCertifiable
SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)

Group: General Forum Members
Points: 7291 Visits: 2250
Make sure user is there is master database and execute following command. Replace login with user_name without quote.

use master
go
grant exec on xp_cmdshell to user_name
go

Hope this is what you are looking for.

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
JMSM
JMSM
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1086 Visits: 979
Thanks a lot everybody, the solution was change the password of the user sqlserver_agent_proxy, the password was very strong and SQL Server didn't work fine with this password.

Thanks and regards
JMSM
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