From af4a7c0f4be4bb94d6299e93f22d26e2f8340e69 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 19 Feb 2010 11:14:15 +1100 Subject: 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 --- source4/winbind/wb_server.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'source4/winbind/wb_server.c') 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; } -- cgit