summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-06-16 15:59:05 +0000
committerVolker Lendecke <vlendec@samba.org>2003-06-16 15:59:05 +0000
commit979c447060387254375ad35a52f58a91027368fb (patch)
tree42eec44af024557035668ef9f119b4e98194fcf5 /source3/utils/net_rpc_join.c
parente2cda4a24ef1ce969eec897bddd4cc5e35737677 (diff)
downloadsamba-979c447060387254375ad35a52f58a91027368fb.tar.gz
samba-979c447060387254375ad35a52f58a91027368fb.tar.bz2
samba-979c447060387254375ad35a52f58a91027368fb.zip
This glosses over John's problem at SambaXP 2003. When we want to join
a NT4 domain as a BDC with an existing workstation account (existing bdc is fine), we fail. Print a friendly error message in this case. The correct solution would probably be to delete the account and try again. But even this makes us better than NT: NT4 fails in this situation with an empty warning message box and an unusable BDC. It has unsuccessfully tried to suck down the domain database, and thus has no administrator account to log in after reboot.... Volker (This used to be commit 1ddeea2179b11cedccf205c7ffea523ee6750b24)
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index ebb0b4dceb..e8fa39ec92 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -317,9 +317,23 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* ensure that schannel uses the right domain */
fstrcpy(cli->domain, domain);
- CHECK_RPC_ERR(cli_nt_establish_netlogon(cli, sec_channel_type,
- md4_trust_password),
- "Error in domain join verfication\n");
+
+ result = cli_nt_establish_netlogon(cli, sec_channel_type,
+ md4_trust_password);
+
+ if (!NT_STATUS_IS_OK(result)) {
+ DEBUG(0, ("Error domain join verification: %s\n\n",
+ nt_errstr(result)));
+
+ if ( NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) &&
+ (sec_channel_type == SEC_CHAN_BDC) ) {
+ d_printf("Please make sure that no computer account\n"
+ "named like this machine (%s) exists in the domain\n",
+ global_myname());
+ }
+
+ goto done;
+ }
/* Now store the secret in the secrets database */