So I am running into a very strange issue. Using ntlm I cannot get any successful authentication through Ansible – even with the local admin user, which works over SSL.
I have tried following the steps here to no avail. I tried granting my specific user full access, I tried with a user that should be in the Domain Admins group, nothing. Any suggestions?
There is a myriad of reasons why this might not work but here is where I would start. Run the following commands in Powershell and paste the info here and we should be able to help a bit more
`
Write-Host “WinRM Service Settings”
winrm get winrm/config/service
if ($certificate) {
Write-Host “Certificate Metadata”
Write-Host “Signature Algorithm: $($certificate.SignatureAlgorithm.FriendlyName)”
Write-Host “Valid To: $($certificate.NotAfter.DateTime)”
} else {
Write-Host “Unable to find certificate info for thumbprint: $thumbprint”
}
}
`
Other things that would be good to know if the version of your pywinrm and dependencies, are you able to run the below and tell us the version of pywinrm, requests-ntlm and ntlm-auth.
pip list
You can also try and just connecting to your Windows Server directly with Powershell to try and rule out whether it is pywinrm or some host configuration.
Thanks for the info from what you have given me there is a chance that your NTLM level is set to NTLMv2 only and the libraries installed on your Ansible host don’t support that. You can verify that by running in Powershell
If the value returned is 3 or greater then the Server only supports NTLMv2 with NTLM (https://technet.microsoft.com/en-us/library/cc960646.aspx). There was a big update to requests-ntlm (1.0.0) which changed the dependency from python-ntlm3 to ntlm-auth which supports things like NTLMv2 and other stuff absent from python-ntlm3. If you can update this library and try again I am hoping it will fix your issue.