diff options
author | Tim Potter <tpot@samba.org> | 2001-12-14 03:55:44 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-12-14 03:55:44 +0000 |
commit | af24b1036c8ceaa37e6b68ac988401846c5c7fe4 (patch) | |
tree | 24105aa3d2245808172feffbf85afd8476fcbf54 | |
parent | 60eb4dc7b1114275f035d27a890e0301a65e0e42 (diff) | |
download | samba-af24b1036c8ceaa37e6b68ac988401846c5c7fe4.tar.gz samba-af24b1036c8ceaa37e6b68ac988401846c5c7fe4.tar.xz samba-af24b1036c8ceaa37e6b68ac988401846c5c7fe4.zip |
Display a nice error message if the user%password specified for net rpc
join does not have administrator privileges.
-rw-r--r-- | source/utils/net_rpc_join.c | 10 |
1 files 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; } - - |