fordpref-ntc - 2014-12-13

I'm having the same issue, same scenario. I compiled winexe from source 2014.12.13 (this morning).

I can use the username/password to run commands, but using just kerberos doesn't work.

doing a -d5 reveals that even though the krb5.conf file specifies the correct KDC's, specifies using DNS, etc...and this works for everything else that does kerberos, when winexe attempts to locate kerberos principals, it is only using the netbios name and it not converting it to the FQDN. No dns queries are performed either other than system A record name lookup.

Here is an excerpt of the logs from winexe:
Failed to get kerberos credentials: kinit for user@ACME failed (Cannot contact any KDC for requested realm)

Cannot reach a KDC we require to contact cifs/dc.acme.local@ : kinit for user@ACME failed (Cannot contact any KDC for requested realm)

I have entries in krb5.conf under [domain_realms] for ACME = ACME.LOCAL, but it doesn't look like winexe is referencing the krb5.conf file at all.

What is even more interesting is that when I specify winexec -k yes, or winexe --kerberos=yes (with the other options) it doesn't try to authenticate with kerberos at all....at least you can't see it in the -d5 output.

sample command:
winexe -U <netbios domain="" name="">/<username> //<fqdn computer="" name=""> '' -d5

winexe -U acme/user //dc.acme.local 'ipconfig' -d5

winexe -U acme/user //wkstn.acme.local 'ipconfig' -d5

and the above with -k yes or --kerberos=yes.

When I do the above as a domain admin account, it works, but it does try kerberos by default and because it can't find a KDC for admin@ACME it fails and falls back to ntlmssp which is successful.