I have installed the current samba (via apt-get) on Debian (Debian 4.9.30-2+deb9u5) and am configuring it to be an Active Directory Domain Controller (AD-DC).
I've also got it configured to use LDAP for the password back-end, but that doesn't seem to matter - I get the same error either way.
I am having trouble getting a Windows 10 VM to join the domain. After some digging, I have narrowed it down. I can run this command
net use \\dc1\ipc$ /u:MYDOMAIN\Administrator password_goes_here
and I see this error in the log.smbd:
[2018/01/24 22:10:08.073191, 3] ../source3/lib/util_procid.c:54(pid_to_procid) pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
It would be really nice if the error message would say what file or directory, but it doesn't. I looked at the code by browsing the git repository and this appears to be trying to open a lock file of some kind. It looks like this file should be
/var/run/samba/msg.lock/#### where the #### is the PID of the process. I can see that there are files in that directory and there's one file for each instance of samba that's running. I even tried making the files writable by all (temporarily).
I'm baffled at this point.
One site I found by googling the error message had a bunch of "me too" responses of other people with the same problem. One reply suggested setting
ntlm auth = yes which didn't help.