This topic needs a title

Hi team,

I am trying to setup winrm connection to windows 12 but getting below error:

<10.47.11.89> WINRM CONNECTION ERROR: the specified credentials were rejected by the server Traceback (most recent call last): File “/usr/lib/python2.6/site-packages/ansible/plugins/connection/winrm.py”, line 154, in _winrm_connect self.shell_id = protocol.open_shell(codepage=65001) # UTF-8 File “/var/lib/awx/venv/ansible/lib/python2.6/site-packages/winrm/protocol.py”, line 132, in open_shell res = self.send_message(xmltodict.unparse(req)) File “/var/lib/awx/venv/ansible/lib/python2.6/site-packages/winrm/protocol.py”, line 207, in send_message return self.transport.send_message(message) File “/var/lib/awx/venv/ansible/lib/python2.6/site-packages/winrm/transport.py”, line 179, in send_message raise InvalidCredentialsError(“the specified credentials were rejected by the server”) InvalidCredentialsError: the specified credentials were rejected by the server fatal: [10.47.11.89]: UNREACHABLE! => { “changed”: false, “msg”: “basic: the specified credentials were rejected by the server”, “unreachable”: true } to retry, use: --limit @/var/lib/awx/.ansible/tmp/test_housekeeping_full.retry

The user that i am trying is added to administrator group as well still the issue.
Can someone please suggest.

Regards,
Ishita

Share me your host file which you have configured in ansible, where you have decalared your connection type as winrm etc. May be i can look into it and help you.

You are also using Basic authentication over HTTP which isn’t allowed by default on Windows and would be causing the rejection error. Please switch to a more secure authentication transport that can encrypt the messages over http like NTLM, Kerberos or CredSSP or use a HTTPS endpoint which encrypts the whole transport packets for you.

Thanks

Jordan

Check whether these configurations are there in your host file…

ansible_user: admin
ansible_password: XXXXXXX
ansible_winrm_scheme: https
ansible_winrm_transport: credssp
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
validate_certs: false