1

Ansible Tower is currently giving me the following output when I try to run the win_ping module against a test windows server:

SSH password: 
*server fqdn* | UNREACHABLE! => {
    "changed": false,
    "msg": "credssp: Server did not response with a CredSSP token after step Step 5. Delegate Credentials - actual 'Negotiate, Kerberos, CredSSP'",
    "unreachable": true
}

Things I have tried/confirmed:

  1. updating Pywinrm to version 0.4.2 as suggested in a similar post
  2. verified winrm and credssp are enabled on the windows host following docs for setting up Windows hosts for management

When checking the logs on the windows host I see the following login and logoff logs:

logoff log:

An account was logged off.

Subject:
    Security ID:        *domain/username*
    Account Name:       *username*
    Account Domain:     *domain*
    Logon ID:       0x1982A7E

Logon Type:         8

This event is generated when a logon session is destroyed. It may be positively correlated with a logon event using the Logon ID value. Logon IDs are only unique between reboots on the same computer.

logon log:

An account was successfully logged on.

Subject:
    Security ID:        SYSTEM
    Account Name:       *fqdn*$
    Account Domain:     *domain*
    Logon ID:       0x3E7

Logon Information:
    Logon Type:     8
    Restricted Admin Mode:  -
    Virtual Account:        No
    Elevated Token:     No

Impersonation Level:        Impersonation

New Logon:
    Security ID:        *domain\username*
    Account Name:       *username*
    Account Domain:     *domain*
    Logon ID:       0x1982A7E
    Linked Logon ID:        0x0
    Network Account Name:   -
    Network Account Domain: -
    Logon GUID:     {51a53c9b-7de7-5880-e7a8-43bcbf704e61}

Process Information:
    Process ID:     0x1428
    Process Name:       C:\Windows\System32\svchost.exe

Network Information:
    Workstation Name:   *server name*
    Source Network Address: -
    Source Port:        -

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

This event is generated when a logon session is created. It is generated on the computer that was accessed.

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 occurred. The most common types are 2 (interactive) and 3 (network).

The New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.

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

The impersonation level field indicates the extent to which a process in the logon session can impersonate.

The authentication information fields provide detailed information about this specific logon request.

 - Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.
 - 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.

I am currently running Tower version 3.8.3 and Ansible version 2.9.27.

The Windows server is running Windows Server 2019.

ITMike89
  • 57
  • 7
  • Hi and welcome to SO. Please [edit](https://stackoverflow.com/posts/70886539/edit) your question and format it correctly. More specifically, put code blocks arround your code, logs, outputs... Once you're on the edit page you can read the help on the right side of the screen or hover the buttons of the editor area for more info on how to proceed. Thanks. – Zeitounator Jan 27 '22 at 22:59
  • Are you telling ansible to use `ansible_connection=winrm` and `ansible_winrm_server_cert_validation=false` ? – Jack Jan 28 '22 at 03:14
  • @Jack Yes, I currently have the following variables set on my windows hosts at the group level: `ansible_connection: winrm ansible_port: 5986 ansible_winrm_server_cert_validation: ignore ansible_winrm_transport: credssp` This has me thinking, I wonder if maybe those group variables don't apply when doing ad hoc commands. I'll test and report back. – ITMike89 Jan 28 '22 at 13:55
  • @Jack That wasn't the case as I was unable to add those variables to the 'extra vars' block of the ad hoc command. It also is giving an error for credssp so it must be trying the correct method. – ITMike89 Feb 01 '22 at 13:37

0 Answers0