Credssp: Received error status from the server

Hi,

I Have a WSL2 on my Windows 10 Pro with Ubuntu 22.04.02 LTS. My Ansible version:

ansible 2.10.8
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]

When I execute my playbook have this error:

fatal: [192.168.232.30]: {"changed": false, "msg": "credssp: Received error status from the server: (3221225581) STATUS_LOGON_FAILURE 0xc000006d", "unreachable": true}

ansible-playbook  -i "$ans_sh_target," -e "ansible_connection=winrm ansible_ssh_port=5986 ansible_user="$ans_sh_usr" ansible_password="$ans_sh_pwd" ansible_winrm_server_cert_validation=ignore ansible_winrm_transport=credssp" main.yml

The VM is reachable at 192.168.232.30 with all open ports

Regards
Massimo

Hi, welcome to the Ansible Community forum and thanks for your message!

However, this is more suited for the Get Help category, if it’s ok with you, I can transfer it.

Please do not send direct messages for such issues :slight_smile:

Thanks,
Carol / Ansible Community Team.

2 Likes

OK thanks!

Assuming the username and password are correct and WinRM is correctly configured with the ports opened, you can try to use ntlm for the transport and post those results/errors. If so then we know the setup, at a basic level is working.
Next, you’ll need to ensure all the prerequisite steps have been completed to ensure the entire environment is configured correctly and reply with the results/errors.

1 Like

Hi,

I solved the problem my install.sh that was this:


#!/bin/sh -v

ans_sh_target='XXX.XXX.XXX.XXX'
ans_sh_usr='bnxroot'
#ans_sh_pwd='XXX'
read -s -p "Indicare la password per l'utente $ans_sh_usr: " ans_sh_pwd

ansible-playbook -i "$ans_sh_target," --become -e "ansible_connection=ssh ansible_user="$ans_sh_usr" ansible_password="$ans_sh_pwd" ansible_become_pass="$ans_sh_pwd" " main.yml

change this #!/bin/sh -v with :slightly_smiling_face:

#!/bin/bash -v

Thanks

1 Like

Hi @maxmin , thank you for sharing your own solution. I’m tagging your last comment as the solution, even if you solved it yourself :slight_smile:

A couple of comments to help you in the future:

  1. I would recommend you upgrade Ansible. The version 2.10 you are using is at end of life.
  2. I just edited your posts to include the “code blocks” tag, so the scripts show in a box, and makes it clear and keeps format. In case you use email, it’s 3 single ticks to open and to close like this:

```
code
```

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.