Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Grant.... with admin option..... (xp_cmdshell) Expand / Collapse
Author
Message
Posted Thursday, February 7, 2008 3:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 10:18 AM
Points: 186, Visits: 816
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
JMSM;)
Post #452622
Posted Thursday, February 7, 2008 4:33 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
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
Post #452646
Posted Thursday, February 7, 2008 4:38 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 10:18 AM
Points: 186, Visits: 816
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
Post #452650
Posted Thursday, February 7, 2008 6:00 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
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."
Post #452680
Posted Thursday, February 7, 2008 7:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 10:18 AM
Points: 186, Visits: 816
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
Post #452729
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse