0

使用本地管理员登录 windows 并使用 AD 管理员帐户安装 xendesktop 时,它是成功的,以下是我所做的:

$adPassword= convertto-securestring "password" -asplaintext -force
$adCredObject = new-object -typename System.Management.Automation.PSCredential -argumentlist "ad.mydomain.com\user",$adPassword
$CurrentProcess = Start-Process -FilePath ".\xendesktop\x64\XenDesktop Setup\XenDesktopServerSetup.exe" -Credential $adCredObject -Wait -PassThru -ArgumentList "/COMPONENTS CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR,LICENSESERVER,STOREFRONT /NOREBOOT /CONFIGURE_FIREWALL"

但是,当使用 puppet 自动化脚本(它与 windows 系统用户一起运行)使用 AD 管理员帐户执行 install xendesktop 时,它失败了,下面是我在 puppet 中运行“exec”所做的(与上面相同的代码):

$adPassword= convertto-securestring "password" -asplaintext -force
$adCredObject = new-object -typename System.Management.Automation.PSCredential -argumentlist "ad.mydomain.com\user",$adPassword
$CurrentProcess = Start-Process -FilePath ".\xendesktop\x64\XenDesktop Setup\XenDesktopServerSetup.exe" -Credential $adCredObject -Wait -PassThru -ArgumentList "/COMPONENTS CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR,LICENSESERVER,STOREFRONT /NOREBOOT /CONFIGURE_FIREWALL"

所以唯一的区别是使用本地管理员运行上述脚本成功,使用windows系统用户运行失败。事件日志中显示的失败消息类似于():

An account failed to log on.

Subject:
    Security ID:        SYSTEM
    Account Name:       MyMachineName
    Account Domain:     MyDomainName
    Logon ID:       0x3e7

Logon Type:         3

Account For Which Logon Failed:
    Security ID:        NULL SID
    Account Name:       Administrator
    Account Domain:     MyMachineName

Failure Information:
    Failure Reason:     Unknown user name or bad password.
    Status:         0xc000006d
    Sub Status:     0xc000006a

Process Information:
    Caller Process ID:  0xd90
    Caller Process Name:    C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin\ruby.exe

Network Information:
    Workstation Name:   MyMachineName
    Source Network Address: -
    Source Port:        -

Detailed Authentication Information:
    Logon Process:      Advapi  
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only):   -
    Key Length:     0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The authentication information fields provide detailed information about this specific logon request.
    - Transited services indicate which intermediate services have participated in this logon request.
    - Package name indicates which sub-protocol was used among the NTLM protocols.
    - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

我也尝试使用 runasspc 来执行此安装,但我得到了相同的结果。任何帮助,将不胜感激。

4

0 回答 0