Authentication with the machine account was broken in 4.13 by a refactor to remove credentials flags (commit b7c366f1f8d8f2f1547d64801db6a49674570c6d), but it was fixed again in 4.15 by another refactor (commit ea071d278a614f17b5417d3ff98e1b8d1fd8970d). The problem in 4.13 and 4.14 is that the username is always set to <machine account name>$@REALM even when kerberos is not used, so windows 2012 R2 rejects the NTLM authentication with NT_STATUS_LOGON_FAILURE.
Created attachment 16735 [details] Patch for v4-13-test and v4-14-test
This looks correct to me. Is it also a problem in master/4.15.rcX ?
(In reply to Jeremy Allison from comment #2) No, it only affects to 4.13 and 4.14 branches.