Results 1 to 3 of 3

Thread: xp_cmdshell under SQL Server 7.0

  1. #1
    Steve Farmer Guest

    xp_cmdshell under SQL Server 7.0

    I am trying to issue an xp_cmdshell command via a guest account. I have given the guest user in the master db exec rights, and when I do something simple like

    execute xp_cmdshell 'dir c:'

    I just get the reply that the command completed without any returned data. However when I am on as 'sa' I get the results back as expected.

    Any ideas anyone!


  2. #2
    Ray Miao Guest

    xp_cmdshell under SQL Server 7.0 (reply)

    What's the access rights for account sqlagentexec?


    ------------
    Steve Farmer at 10/7/99 4:08:01 AM

    I am trying to issue an xp_cmdshell command via a guest account. I have given the guest user in the master db exec rights, and when I do something simple like

    execute xp_cmdshell 'dir c:'

    I just get the reply that the command completed without any returned data. However when I am on as 'sa' I get the results back as expected.

    Any ideas anyone!


  3. #3
    VK Guest

    xp_cmdshell under SQL Server 7.0 (reply)

    From Books Online:
    By default, only members of the sysadmin fixed server role can execute this extended stored procedure. You may, however, grant other users permission to execute this stored procedure. Users who are not members of the sysadmin fixed server role will always run their Windows NT commands in the context of the SQLAgentCmdExec user account, which is the same account used by SQL Server Agent for scheduled tasks entered by users who are not members of sysadmin. When members of the sysadmin fixed server role execute xp_cmdshell, their Windows NT commands execute in the MSSQLServer service's security context, which by default is a user account with local administrator authority.

    In SQL Server 7.0, the account is called SQLAgentCmdExec. Users who are not members of the sysadmin fixed server role now run commands in the context of this account without specifying a configuration change.


    VK


    ------------
    Steve Farmer at 10/7/99 4:08:01 AM

    I am trying to issue an xp_cmdshell command via a guest account. I have given the guest user in the master db exec rights, and when I do something simple like

    execute xp_cmdshell 'dir c:'

    I just get the reply that the command completed without any returned data. However when I am on as 'sa' I get the results back as expected.

    Any ideas anyone!


Posting Permissions

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