summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-08-31 05:48:37 +0000
committerTim Potter <tpot@samba.org>2001-08-31 05:48:37 +0000
commitd01c23680a7cbd0a4bdc60c82131df5c8cd19f1d (patch)
treec90022a9fd7529234882958ce6b779b019655810 /source3/utils
parentb4ed8c836598a68d68aed90fe7d0c1a48d4a7583 (diff)
downloadsamba-d01c23680a7cbd0a4bdc60c82131df5c8cd19f1d.tar.gz
samba-d01c23680a7cbd0a4bdc60c82131df5c8cd19f1d.tar.bz2
samba-d01c23680a7cbd0a4bdc60c82131df5c8cd19f1d.zip
Set acb_info to ACB_SVRTRUST if we are joining the domain as a BDC without
going through the server manager. (This used to be commit 52f5abae4667d841be7ca8f5ff0f25ba6d027067)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 7ca9c37f28..74b9916d93 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -184,6 +184,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
fstring dest_host, acct_name;
struct in_addr dest_ip;
TALLOC_CTX *mem_ctx;
+ uint32 acb_info;
/* rpc variables */
@@ -283,11 +284,14 @@ static int join_domain_byuser(char *domain, char *remote_machine,
strlower(acct_name);
+ acb_info = (lp_server_role() == ROLE_DOMAIN_BDC) ? ACB_SVRTRUST :
+ ACB_WSTRUST;
+
{
uint32 unknown = 0xe005000b;
result = cli_samr_create_dom_user(&cli, mem_ctx, &domain_pol,
- acct_name, ACB_WSTRUST,
+ acct_name, acb_info,
unknown, &user_pol,
&user_rid);
@@ -389,7 +393,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
ctr.switch_value = 0x10;
ctr.info.id10 = &p10;
- init_sam_user_info10(&p10, ACB_WSTRUST);
+ init_sam_user_info10(&p10, acb_info);
/* Ignoring the return value is necessary for joining a domain
as a normal user with "Add workstation to domain" privilege. */