# Trouble authenticating to a Windows host Using ntlm

**URL:** <https://forum.ansible.com/t/trouble-authenticating-to-a-windows-host-using-ntlm/8343>\
**Category:** Get Help\
**Tags:** windows\
**Created:** [September 9, 2024, 8:59am UTC](https://forum.ansible.com/t/trouble-authenticating-to-a-windows-host-using-ntlm/8343 "2024-09-09T08:59:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avinash](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Avinash](https://forum.ansible.com/u/Avinash)\
**Post date:** [September 9, 2024, 8:59am UTC](https://forum.ansible.com/t/trouble-authenticating-to-a-windows-host-using-ntlm/8343/1 "2024-09-09T08:59:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bmbufalo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bmbufalo/32/295_2.png) [@bmbufalo](https://forum.ansible.com/u/bmbufalo)\
**Post date:** [September 9, 2024, 1:17pm UTC](https://forum.ansible.com/t/trouble-authenticating-to-a-windows-host-using-ntlm/8343/3 "2024-09-09T13:17:44Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Avinash](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Avinash](https://forum.ansible.com/u/Avinash)\
**Post date:** [September 9, 2024, 3:58pm UTC](https://forum.ansible.com/t/trouble-authenticating-to-a-windows-host-using-ntlm/8343/4 "2024-09-09T15:58:06Z")

</div>

> [@bmbufalo](#):
>
> -vvvvv

I Just removed ip and user name

$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
