问题
I am testing ansible (developer build) to connect to a windows machine.
ansible 2.0.0 (devel d1b98ec776)
The following command fails
ansible inh-jnambood-dt.india.mentorg.com -m win_ping -vvvv
Error is as below
bash-4.1$ ansible inh-jnambood-dt.india.mentorg.com -m win_ping -vvvv
Using /etc/ansible/ansible.cfg as config file
Loaded callback minimal of type stdout, v2.0
<inh-jnambood-dt.india.mentorg.com> ESTABLISH WINRM CONNECTION FOR USER: jnambood@MGC.MENTORG.COM on PORT 5985 TO inh-jnambood-dt.india.mentorg.com
inh-jnambood-dt.india.mentorg.com | FAILED! => {
"failed": true,
"msg": "ERROR! kerberos: (('Unspecified GSS failure. Minor code may provide more information', 851968), ('Server not found in Kerberos database', -1765328377)), plaintext: 401 Unauthorized."
jnambood
is my user id MGC.MENTORG.COM
is the domain
Clearly there is some step I missed. What should I do to fix this error?
回答1:
That usually means that the Linux host where you're running kinit
is not joined to the domain (ie, it doesn't have a properly configured computer account in the domain). The existing docs unhelpfully omit that requirement...
回答2:
I've also seen this occur where the FQDN of the the host is not entered in both the command and the ansible hosts file.
Try something like: inh-jnambood-dt.mcg.mentorg.com
HTH
来源:https://stackoverflow.com/questions/33184037/ansible-windows-fails-with-server-not-found-in-kerberos-database