From d124769a4cfc8713f7eeb299a6db95e522ac33b3 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 7 Jul 2006 00:20:55 +0000 Subject: r16845: Properly report the error during join when the set password fails --- source/utils/net_domain.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/utils/net_domain.c b/source/utils/net_domain.c index ae8d6b6c552..a4a52b23842 100644 --- a/source/utils/net_domain.c +++ b/source/utils/net_domain.c @@ -302,6 +302,13 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli, status = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, &user_pol, 24, &cli->user_session_key, &ctr); + if ( !NT_STATUS_IS_OK(status) ) { + d_fprintf( stderr, "Failed to set password for machine account (%s)\n", + nt_errstr(status)); + return status; + } + + /* Why do we have to try to (re-)set the ACB to be the same as what we passed in the samr_create_dom_user() call? When a NT workstation is joined to a domain by an administrator the -- cgit v1.2.1