diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-02-19 11:14:15 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-02-19 11:18:27 +1100 |
commit | af4a7c0f4be4bb94d6299e93f22d26e2f8340e69 (patch) | |
tree | 6ad36815d368b7ed2d1f59c03bbe4fd242f7d3a5 /source4/winbind | |
parent | 91a4db635802a391a560b739c996b5599a3df1a4 (diff) | |
download | samba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.tar.gz samba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.tar.bz2 samba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.zip |
s4:winbind Make the 'no SID found' message even more detailed
Now we give the user a clue as to what may be wrong, and the file path
that we could not find the domain SID in.
Andrew Bartlett
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/wb_server.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c index 03a443ac16..306c8e2add 100644 --- a/source4/winbind/wb_server.c +++ b/source4/winbind/wb_server.c @@ -241,19 +241,36 @@ static void winbind_task_init(struct task_server *task) service->task->lp_ctx, lp_netbios_name(service->task->lp_ctx), &errstring); if (!primary_sid) { - char *message = talloc_asprintf(task, "Cannot start Winbind (standalone configuration): %s", errstring); + char *message = talloc_asprintf(task, + "Cannot start Winbind (standalone configuration): %s: " + "Have you provisioned this server (%s) or changed it's name?", + errstring, lp_netbios_name(service->task->lp_ctx)); task_server_terminate(task, message, true); return; } break; case ROLE_DOMAIN_MEMBER: + primary_sid = secrets_get_domain_sid(service, + service->task->event_ctx, + service->task->lp_ctx, + lp_workgroup(service->task->lp_ctx), &errstring); + if (!primary_sid) { + char *message = talloc_asprintf(task, "Cannot start Winbind (domain member): %s: " + "Have you joined the %s domain?", + errstring, lp_workgroup(service->task->lp_ctx)); + task_server_terminate(task, message, true); + return; + } + break; case ROLE_DOMAIN_CONTROLLER: primary_sid = secrets_get_domain_sid(service, service->task->event_ctx, service->task->lp_ctx, lp_workgroup(service->task->lp_ctx), &errstring); if (!primary_sid) { - char *message = talloc_asprintf(task, "Cannot start Winbind (domain configuration): %s", errstring); + char *message = talloc_asprintf(task, "Cannot start Winbind (domain controller): %s: " + "Have you provisioned the %s domain?", + errstring, lp_workgroup(service->task->lp_ctx)); task_server_terminate(task, message, true); return; } |