summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-12-05 11:00:26 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-12-05 11:00:26 +0000
commit8ba00d147bbdb705b411e182433632c81a036188 (patch)
treeebbeb3b46c5cb3a2da025a324b1cc31f8af182ac /source3/utils/net_rpc_join.c
parent0d09562eed608941b2bee29e37d7ea4ba33582c3 (diff)
downloadsamba-8ba00d147bbdb705b411e182433632c81a036188.tar.gz
samba-8ba00d147bbdb705b411e182433632c81a036188.tar.bz2
samba-8ba00d147bbdb705b411e182433632c81a036188.zip
OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code. Futhermore, this moves that entire area over to the libsmb codebase, rather than the crufty old rpc_client stuff. I have also fixed up the smbpasswd -a -m bug in the process. We also have a new 'net rpc changetrustpw' that can be called from a cron-job to regularly change the trust account password, for sites that run winbind but not smbd. With a little more work, we can kill rpc_client from smbd entirly! (It is mostly the domain auth stuff - which I can rework - and the spoolss stuff that sombody else will need to look over). Andrew Bartlett (This used to be commit 575897e879fc175ba702adf245384033342c903d)
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 463de61b05..2b73117c38 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -191,7 +191,7 @@ int net_rpc_join(int argc, const char **argv)
{
char *str;
- str = generate_random_str(15);
+ str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
clear_trust_password = strdup(str);
}
@@ -256,8 +256,6 @@ int net_rpc_join(int argc, const char **argv)
strupper(domain);
- secrets_init();
-
if (!secrets_store_domain_sid(domain, &domain_sid)) {
DEBUG(0, ("error storing domain sid for %s\n", domain));
goto done;
@@ -284,7 +282,7 @@ int net_rpc_join(int argc, const char **argv)
goto done;
}
- CHECK_RPC_ERR(cli_nt_setup_creds(cli, stored_md4_trust_password),
+ CHECK_RPC_ERR(new_cli_nt_setup_creds(cli, stored_md4_trust_password),
"error in domain join verification");
retval = 0; /* Success! */