Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    13

    Unanswered: Executing xp_cmdshell with non sys admin privileges

    I have an SP which is being used by xp_cmdshell. i have given EXEC previlege on this extended stored procedure to the non sysdba account.

    when i tried to execute xp_cmdshell (exec xp_cmdshell 'copy c:\vb c:\vbs') with non sysdba account, i am getting the following error message

    xpsql.cpp: Error 1314 from CreateProcessAsUser on line 636
    Msg 50001, Level 1, State 0

    Executing xp_cmdshell awith non sys dmin privileges
    can somebody plz help me?

    is there a method to copy files from one location to another location for non sysdba accounts?

  2. #2
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    113
    You could try using EXECUTE AS to execute your stored procedure as an admin user and thus have priviledge to perform external operations.

    See help on EXECUTE AS for more information.

  3. #3
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    I believe you have to create a proxy account:

    EXEC sp_xp_cmdshell_proxy_account 'domain\domainacct', 'password'
    go
    GRANT EXECUTE ON xp_cmdshell TO SQLUser
    go

Posting Permissions

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