Here is the error message: mkdir failed on directory /.../samba/var/cache/lck: No such file or directory Could not initialise message context. Try running as root Failed to join domain: Access is denied The issue was fixed with the following patch, not sure if it is the best place to create the var/cache folder: diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index ae35282..d2f2f7b 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -226,6 +226,12 @@ int messaging_dgm_init(struct tevent_context *ev, return ENAMETOOLONG; } + ok = directory_create_or_exist_strict(cache_dir, dir_owner, 0755); + if (!ok) { + DEBUG(0, ("Could not create cache directory: %s\n", cache_dir)); + TALLOC_FREE(ctx); + return EACCES; + } ret = messaging_dgm_lockfile_create(cache_dir, dir_owner, pid.pid, &ctx->lockfile_fd, pid.unique_id); if (ret != 0) {
I appreciate the patch, but I don't think this is the right place to fix it. Probably this should be done inside the net join code itself, once we know we're running as root...