We’re having issues establishing a WinRM session to a windows workstation. As a test I’m using win_ping to attempt to get a response. I’ve tried basic and ntlm transport methods which both failed.
What changes should i be making to resolve this error ?
Error:
“changed”: false,
“msg”: “ntlm: the specified credentials were rejected by the server”,
“unreachable”: true
Generally, I see this and it’s a problem with the account you are using to connect with. The account exists but the password is wrong, expired, or locked. You may also want to run your Ansible command again but add -vvvvv to it so that additional debugging information is printed to the console and post the results here (be sure to scrub any sensitive details out).
$ansible Win_DD -i hosts -m win_ping -vvvv
ansible 2.9.18
config file = /apps/ansible/ansible.cfg
configured module search path = [‘/apps/home/ansible/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /apps/home/ansible/env/lib64/python3.6/site-packages/ansible
executable location = /apps/home/ansible/env/bin/ansible
python version = 3.6.8 (default, Oct 25 2023, 10:26:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Using /apps/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /apps/ansible/hosts inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /apps/home/ansible/env/lib64/python3.6/site-packages/ansible/plugins/callback/minimal.py
Skipping callback ‘actionable’, as we already have a stdout callback.
Skipping callback ‘counter_enabled’, as we already have a stdout callback.
Skipping callback ‘debug’, as we already have a stdout callback.
Skipping callback ‘dense’, as we already have a stdout callback.
Skipping callback ‘dense’, as we already have a stdout callback.
Skipping callback ‘full_skip’, as we already have a stdout callback.
Skipping callback ‘json’, as we already have a stdout callback.
Skipping callback ‘minimal’, as we already have a stdout callback.
Skipping callback ‘null’, as we already have a stdout callback.
Skipping callback ‘oneline’, as we already have a stdout callback.
Skipping callback ‘selective’, as we already have a stdout callback.
Skipping callback ‘skippy’, as we already have a stdout callback.
Skipping callback ‘stderr’, as we already have a stdout callback.
Skipping callback ‘unixy’, as we already have a stdout callback.
Skipping callback ‘yaml’, as we already have a stdout callback.
META: ran handlers
Using module file /apps/home/ansible/env/lib64/python3.6/site-packages/ansible/modules/windows/win_ping.ps1
Pipelining is enabled.
ESTABLISH WINRM CONNECTION FOR USER: <user_name> on PORT 5985 TO ip
ip | UNREACHABLE! => {
“changed”: false,
“msg”: “ntlm: the specified credentials were rejected by the server”,
“unreachable”: true