From af24b1036c8ceaa37e6b68ac988401846c5c7fe4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 14 Dec 2001 03:55:44 +0000 Subject: [PATCH] Display a nice error message if the user%password specified for net rpc join does not have administrator privileges. --- source/utils/net_rpc_join.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c index c9fa52a7340..16b0ccbaa80 100644 --- a/source/utils/net_rpc_join.c +++ b/source/utils/net_rpc_join.c @@ -141,6 +141,14 @@ int net_rpc_join(int argc, const char **argv) if (!NT_STATUS_IS_OK(result) && !NT_STATUS_EQUAL(result, NT_STATUS_USER_EXISTS)) { d_printf("Create of workstation account failed\n"); + + /* If NT_STATUS_ACCESS_DENIED then we have a valid + username/password combo but the user does not have + administrator access. */ + + if (NT_STATUS_V(result) == NT_STATUS_V(NT_STATUS_ACCESS_DENIED)) + d_printf("User specified does not have administrator privileges\n"); + goto done; } @@ -286,5 +294,3 @@ done: return retval; } - -