Re: XP_CMDSHELL

From: Dinesh T.K (tkdinesh_at_nospam.mail.tkdinesh.com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 22:03:36 +0530

Pluto,

When master..xp_cmdshell is called by a user who is a member of the sysadmin
fixedserver role, master..xp_cmdshell will be executed under the account's
security context in which the SQL Server service is running.

If the user who calls master..xp_cmdshell is not a member of the sysadmin
role, master..xp_cmdshell will impersonate the SQL Server Agent proxy
account, which is specified using xp_sqlagent_proxy_account.This is for
SQL2000 (in Enterprise manager, right click sql agent | properties and check
in 'Job system' tab). For SQL7 it will be run under a local account named
SQLAgentCmdExec.

--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Pluto" <anonymous@discussions.microsoft.com> wrote in message
news:60b301c42e04$76507df0$a501280a@phx.gbl...
> Hello people
> I'm I right in thinking the xp_cmdshell is executed with
> the same user as starts the MSSQLServer ?
>
>


Relevant Pages

  • Re: SQL Login
    ... The sa login account is a member of that role as well. ... Dejan Sarka, SQL Server MVP ... > But how do we add the User X to the sysadmin / ...
    (microsoft.public.sqlserver.security)
  • Re: cannot acees two databases as owner
    ... member of the built-in group Administrators, is not sysadmin. ... Administrator of SQL Server. ...
    (microsoft.public.sqlserver.setup)
  • Re: Cant edit logins or server roles
    ... A windows local admin may have sysadmin access for a SQL Server ... don't seem to be a member of sysadmins. ...
    (microsoft.public.sqlserver.security)
  • Re: permissions not working
    ... at the windows NT level they have sysadmin rights because I did not ... It is likely that the user in question is a member of the Windows Administrators group on the SQL Server. ... Administrators group members access the SQL Server via membership of the BUILTIN\Administrators login are sysadmin role members by default in SQL 2000. ...
    (microsoft.public.sqlserver.security)
  • Re: cannot acees two databases as owner
    ... it does not matter you are a member of the ... the sysadmin fixed server role or if there is no any other Login which is ... group if it's a domain) and you can login to your SQL Server with, ...
    (microsoft.public.sqlserver.setup)