wbinfo --sid-to-name returns different outputs, depending on what has been queried and cached previously: $ bin/wbinfo --name-to-sid="$REALM/$DC_USERNAME" S-1-5-21-274866641-1785003985-1147516049-500 SID_USER (1) $ bin/wbinfo --sid-to-name=S-1-5-21-274866641-1785003985-1147516049-500 ADDOM.SAMBA.EXAMPLE.COM/administrator 1 $ bin/net cache -s $SERVERCONFFILE flush $ bin/wbinfo --sid-to-name=S-1-5-21-274866641-1785003985-1147516049-500 ADDOMAIN/Administrator 1 Internall, winbindd issues a LSA lookupnames call that takes the realm.com\username as input (which is valid according to 3.1.4.5 LsarLookupNames4 (Opnum 77)). The lookupnames call also returns domain information, including the short domain name. The problem here is that winbindd fills the cache based on the input from wbinfo, instead of the domain name queried from the domain controller. Patches to follow.
https://lists.samba.org/archive/samba-technical/2019-March/132921.html
Created attachment 15085 [details] patches for 4.9
Created attachment 15086 [details] patches for 4.10
Pushed to autobuild-v4-{10,9}-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!