Re: xp_CmdShell and VBScript
From: Scott Elgram (SElgram_at_verifpoint.com)
Date: 03/15/04
- Next message: Jim: "Security Log Backup Script"
- Previous message: Tim McGue: "RE: xp_CmdShell and VBScript"
- In reply to: Tim McGue: "RE: xp_CmdShell and VBScript"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Mar 2004 12:42:32 -0800
Tim,
The computer the script is attempting to create a local account on is
not in the domain from which the script is being run. I was under the
impression that the line "Set oComputer = oDSO.OpenDSObject("WinNT://"
&strComputer, "Administrator", "1234", ADS_SECURE_AUTHENTICATION)" would
force the script to use the Administrator account to create a local account
on the target computer. Inside the domain the script works perfectly from
xp_CmdShell but when I attempted this for a computer outside the domain I
got the error.
-- -Scott Elgram "Tim McGue" <anonymous@discussions.microsoft.com> wrote in message news:9D0C28C1-7DE9-4E28-AF63-F5BAC762FB02@microsoft.com... > This really looks like a permissions issue. This is what the books online has to say about that command: > > "When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed server role, xp_cmdshell will be executed under the security context in which the SQL Server service is running. When the user is not a member of the sysadmin group, xp_cmdshell will impersonate the SQL Server Agent proxy account, which is specified using xp_sqlagent_proxy_account. If the proxy account is not available, xp_cmdshell will fail. This is true only for Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and xp_cmdshell is always executed under the security context of the Windows 9.x user who started SQL Server." > > Based upon that information make sure the account that is running your SQL Server service or your xp_sqlagent_proxy_account has permissions to create user accounts in your active directory/domain. > > Tim McGue
- Next message: Jim: "Security Log Backup Script"
- Previous message: Tim McGue: "RE: xp_CmdShell and VBScript"
- In reply to: Tim McGue: "RE: xp_CmdShell and VBScript"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|