January 06, 2009     |
Idera09
SQL Security Forums
Note: SQLSecurity.com does not allow nor require registration due to privacy concerns for users. SQLSecurity.com is open and anonymous for all. Please report any abuse or profanity.
Subject: Who is granted EXECUTED on xp_cmdShell
Prev Next

Author Messages
Nachid

09/11/2001 4:29 AM Quote Reply Alert 
I want to know who is granted EXECUTE on xp_cmdShell. I run sp_helprotect xp_cmdShell from Query Analyzer But it does'nt return any information Why ? W2k - SQL/Server 2000 Thanks
Chip Andrews

01/01/2001 12:00 AM Quote Reply Alert 
This is normal. By default, only a member of the sysadmin role can execute xp_cmdshell. In other words, no one has been granted the right to execute the procedure. Since sysadmins don't need explicit rights they are the only ones who can execute it. Chip
Nachid

01/01/2001 12:00 AM Quote Reply Alert 
But it's possible to grant EXECUTE on xp_cmdShell to anyone you want. What I want to get is the list of personns granted EXECUTE on xp_cmdShell as you can obtain this list for any other procedure by typing : sp_helprotect procedureName
Chip Andrews

01/01/2001 12:00 AM Quote Reply Alert 
Yes - and if you DO grant someone access to execute xp_cmdshell then you should see them when you execute sp_helprotect xp_cmdShell As an example I just granted the public role access to the procedure and now my output from the above is: Owner Object Grantee Grantor ProtectType Action Column ------ ---------------------- ------------ ------- ----------- ------- ------ dbo xp_cmdshell public dbo Grant Execute .
Nachid

09/11/2001 4:21 AM Quote Reply Alert 
Problem solved !!! You have to be in Master database to get a correct answer from sp_helprotect xp_cmdshell use master sp_helprotect xp_cmdshell get a valid answer but use pubs sp_helprotect xp_cmdshell get a blank answer !?
Chip

09/11/2001 11:51 AM Quote Reply Alert 
Yes - xp_cmdshell exists in the master database. My apologies for not mentioning that earlier - could have saved us both a lot of postings...

Forums > Discussions > SQL Server Security > Who is granted EXECUTED on xp_cmdShell

Quick Reply
Username:  
Subject:  
Body:
 



ActiveForums 3.6
Copyright 1999 by Chip Andrews   |  Privacy Statement  |  Terms Of Use