HI Team,
I have a new requirement to install an agant in 1500 windows machines, all these machine are Domain managed VMs. When i try to connect using local user, i am able to connect the windows box, But when i use AD credentials its not working. Let me share my current Setup here. Please help.
Windows VM settings:-
- Enabled WINRM
- Ran the script in the remote Windows VM
Ansible Host:(Linux RHEL 7.2)
Installed packages:
- Ansible 2.2.1.0
- Python 2.7.5
- krb5-workstation-1.14.1-27.el7_3.x86_64
- krb5-devel-1.14.1-27.el7_3.x86_64
- krb5-libs-1.14.1-27.el7_3.x86_64
- kerberos
Krb5.conf entry as below:
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[realms]
}
[domain_realm]
==============
Kinit and Klist as below:-
[root@liuatasans01 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Valid starting Expires Service principal
renew until 04/21/2017 18:31:55
[root@liuatasans01 ~]#
============================
Inventory file as below:-
/etc/ansible/hosts
[windows]
172.45.17.182
[windows:vars]
ansible_password="P@$$wo6d"
ansible_port=5985
ansible_connection=winrm
=====================================
Error as below:-(while trying to connect the AD user)
[root@liuatasans01 ~]# ansible windows -m win_ping
172.45.17.182 | UNREACHABLE! => {
"changed": false,
"msg": "kerberos: __init__() got an unexpected keyword argument 'hostname_override', plaintext: auth method plaintext requires a password",
"unreachable": true
}
====================================
Working when connecting as windows local user:-
[root@liuatasans01 ~]# ansible windows -m win_ping
172.45.17.182 | SUCCESS => {
"changed": false,
"ping": "pong"
}
=================================
Please help to fix the issue:
While connecting as AD user, getting the below error in the windows Audit log
The computer attempted to validate the credentials for an account.
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Source Workstation: winvmuatiis7202
Error Code: 0xC0000064
================================
Appreciate your help on this