Re: Granting xp_cmdshell permission to SQL Login
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Nov 2007 22:26:01 -0600
That's the point. I cannot grant access to a SQL Login. It works fine with a
Windows login, but I have a SQL Login.
xp_cmdshell needs an OS security context when it runs. That security context is the Windows xp_cmdshell proxy account when it's executed by a non-sysadmin user. The 1329 error isn't related to the SQL login executing xp_cmdshell but is rather the Windows error code returned because the xp_cmdshell proxy account doesn't have the needed Windows permissions
My guess is that the Windows login you mentioned is a sysadmin role member. Xp_cmdshell runs under the context of the SQL Server service account when executed by a sysadmin role member and that account probably has different permissions than the proxy account
I successfully ran a modified of your original script on my test system. My xp_cmdshell proxy account is a minimally privileged domain user account and .. I didn't grant CONTROL SERVER permission..
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark Allison" <marka@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:61EA5CCA-4C65-410C-959B-7B67195F2DFD@xxxxxxxxxxxxxxxx
Hi Dan,
That's the point. I cannot grant access to a SQL Login. It works fine with a
Windows login, but I have a SQL Login.
From BOL:
sp_xp_cmdshell_proxy_account [ NULL | { 'account_name' , 'password' } ]
Arguments
NULL
Specifies that the proxy credential should be deleted.
account_name
Specifies a Windows login that will be the proxy.
Mark.
"Dan Guzman" wrote:
When I type "NET HELPMSG 1329" from the command prompt, I get message "Logon
failure: user not allowed to log on to this computer."
Make sure the proxy account (configured with sp_xp_cmdshell_proxy_account)
has permissions to login locally.
--
Hope this helps.
Dan Guzman
SQL Server MVP
.
- References:
- Granting xp_cmdshell permission to SQL Login
- From: Mark Allison
- Re: Granting xp_cmdshell permission to SQL Login
- From: Uri Dimant
- Re: Granting xp_cmdshell permission to SQL Login
- From: Uri Dimant
- Re: Granting xp_cmdshell permission to SQL Login
- From: Mark Allison
- Re: Granting xp_cmdshell permission to SQL Login
- From: Dan Guzman
- Granting xp_cmdshell permission to SQL Login
- Prev by Date: RE: Can user view objects they only have select permission on?
- Next by Date: Re: sa password
- Previous by thread: Re: Granting xp_cmdshell permission to SQL Login
- Next by thread: Re: Granting xp_cmdshell permission to SQL Login
- Index(es):
Relevant Pages
|