Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sp_xp_cmdshell_proxy_account

Author  Topic 

X002548
Not Just a Number

15586 Posts

Posted - 2011-05-18 : 14:34:43
EXEC sp_xp_cmdshell_proxy_account

Been reading BOL and I'm still not clear...

IF I do this for a windows login, will they have exec auth on cmdshell?


If so, what's with the password requirements? is the password for the account on the domain (nor sure if I'm saying that last part correctly or not)




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-05-18 : 19:44:52
xp_cmdshell lets you run things at the OS level but needs a security context to operate in when at the OS level. If, at the SQL level, you are a sysadmin, you run, at the OS level, with the same rights as the SQL Service. If you are not sysadmin at the SQL level, you run, at the OS level, with the rights of the proxy account; in effect xp_cmdshell "logs into the OS" using the proxy account user and password. The proxy account is strictly an OS level concept.

You still need to enable the use of xp_cmdshell; otherwise, SQL won't allow anyone to invoke it, including sysadmin. Having enabled xp_cmdshell, the non-sysadmin user still needs to be granted SQL rights to execute XP_cmdshell. sysadmin users don't need to be granted rights because they are sysadmin and will do whatever the heck they want, thank-you very much.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-05-18 : 20:25:54
I have the surface area reconfigured...I would like a non-sa account (dbo) to execute xp_cmdshell instead of giving a dba in training sa

Sorry for the lack of info

but what account is the proxy?

Windows or SQL Server Security?

BOL doesn't say...it would seem, since it want to manage a pwd, that it might be a sql server account

Not sure, can't find definitive info


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-05-19 : 11:29:19
The proxy account is a Windows only concept; it has nothing to do with SQL or SQL Logins.

(I hope this next part doesn't sound condescending; I'm simply trying to clarify things by stating what you already know)

Before you can use Windows, you need to login to the OS; just like you do every morning when you arrive at work. Based on the login, you get certain rights under Windows. Windows Administrators, for instance, can do more things than a normal user.

When xp_cmdshell is invoked, it "logs into Windows" (just like you do when you arrive at work) and gets a defined set of resources (disk drives, read/read-write, etc.). It doesn't log into Windows as you; instead it either uses the SQL Service Account or the Proxy Account. The proxy account defines the Windows Login and Password to use when it "logs into Windows" and the SQL User is not a member of SQL sysadmin.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-05-19 : 11:58:42
OK, cool, but what a mangement nightmare...everytime the windows password changed you have to update the proxy...AND it's not so good because you have to ask them what their passwrod is, and that's not a good idea either

Just wonder why we need to supply a password I guess



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-05-19 : 12:41:11
In re: what a mangement nightmare

Agreed. I believe the thinking is that there should be a severely limited "special" Windows account that would be used as the proxy and have a non-expiring password. Under this, if security was ever breached at the SQL level, the xp_cmdshell could not be used to give carte blanche to the rest of the system.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page
   

- Advertisement -