Professional Web Applications Themes

xp_cmdshell doesn't run with the logged in user account... - Microsoft SQL / MS SQL Server

xp_cmdshell always runs under the sqlserver service account. for the copy to work, your service account must be a domain account given permission to the directories. "faustino Dina" <fdinamatusa.com.mx> wrote in message news:#dhWHk$PDHA.3768tk2msftngp13.phx.gbl... > Hi, > > I'm trying to do this: > exec xp_cmdshell 'copy C:\itt.log \Fdina\INPUT' > > The share \Fdina\INPUT' I give full access to user fdina. The Sql Server is > running under the SqlService account.If I login to Sql Server as fdina > (Windows authentication) I can't do the copy. Why? It's supposed that Sql > Server runs the command shell with my fdina account, ...

  1. #1

    Default Re: xp_cmdshell doesn't run with the logged in user account...

    xp_cmdshell always runs under the sqlserver service account. for the copy to
    work, your service account must be a domain account given permission to the
    directories.


    "faustino Dina" <fdinamatusa.com.mx> wrote in message
    news:#dhWHk$PDHA.3768tk2msftngp13.phx.gbl...
    > Hi,
    >
    > I'm trying to do this:
    > exec xp_cmdshell 'copy C:\itt.log \\Fdina\INPUT'
    >
    > The share \\Fdina\INPUT' I give full access to user fdina. The Sql Server
    is
    > running under the SqlService account.If I login to Sql Server as fdina
    > (Windows authentication) I can't do the copy. Why? It's supposed that Sql
    > Server runs the command shell with my fdina account, or not?
    >
    > Thanks in advance
    > Faustino
    >
    >

    bruce barker Guest

  2. #2

    Default Re: xp_cmdshell doesn't run with the logged in user account...

    The SQL Server service account is used when members of the sysadmin role
    execute xp_cmdshell. The SQL Agent proxy account is used for
    non-sysadmin role members.

    --
    Hope this helps.

    Dan Guzman
    SQL Server MVP

    -----------------------
    SQL FAQ links (courtesy Neil Pike):

    [url]http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800[/url]
    [url]http://www.sqlserverfaq.com[/url]
    [url]http://www.mssqlserver.com/faq[/url]
    -----------------------

    "faustino Dina" <fdinamatusa.com.mx> wrote in message
    news:%23dhWHk$PDHA.3768tk2msftngp13.phx.gbl...
    > Hi,
    >
    > I'm trying to do this:
    > exec xp_cmdshell 'copy C:\itt.log \\Fdina\INPUT'
    >
    > The share \\Fdina\INPUT' I give full access to user fdina. The Sql
    Server is
    > running under the SqlService account.If I login to Sql Server as fdina
    > (Windows authentication) I can't do the copy. Why? It's supposed that
    Sql
    > Server runs the command shell with my fdina account, or not?
    >
    > Thanks in advance
    > Faustino
    >
    >

    Dan Guzman Guest

Similar Threads

  1. Run shutdown.exe in batch file while logged off doesn't work?
    By Craig in forum Windows Setup, Administration & Security
    Replies: 1
    Last Post: September 30th, 04:55 PM
  2. If user logged in statement?
    By barbedwire103 in forum Dreamweaver AppDev
    Replies: 4
    Last Post: April 2nd, 08:55 PM
  3. Replies: 4
    Last Post: August 17th, 10:45 PM
  4. Check if user is already logged in
    By fr? in forum PHP Programming
    Replies: 7
    Last Post: October 15th, 04:37 AM
  5. Logged in user?
    By Betina Y Andersen in forum ASP
    Replies: 7
    Last Post: September 22nd, 02:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139