summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-12-14 03:55:44 +0000
committerTim Potter <tpot@samba.org>2001-12-14 03:55:44 +0000
commitf46eb148065e25f6de5addbd9c58940f49a35aca (patch)
treed190e980154b0bdc8eea788d2242134bacf1e189 /source3/utils/net_rpc_join.c
parent69e0fe9972e8897f61307d988f290a41c105e1f5 (diff)
downloadsamba-f46eb148065e25f6de5addbd9c58940f49a35aca.tar.gz
samba-f46eb148065e25f6de5addbd9c58940f49a35aca.tar.bz2
samba-f46eb148065e25f6de5addbd9c58940f49a35aca.zip
Display a nice error message if the user%password specified for net rpc
join does not have administrator privileges. (This used to be commit af24b1036c8ceaa37e6b68ac988401846c5c7fe4)
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index c9fa52a734..16b0ccbaa8 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/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;
}
-
-