From da517a3ff4c133a1475e8e63054201551d132436 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 18 Nov 1999 23:15:45 +0000 Subject: responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, the request name. modified createuser rpcclient command to examine name being added. if it ends in a $, assume that a workstation trust account is being added. (This used to be commit 4aea261cb0e5f34255ff83271eb5cadb0eb78bc9) --- source3/rpcclient/cmd_samr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source3/rpcclient/cmd_samr.c') diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 90266f0868..a97288d0a2 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1605,6 +1605,7 @@ void cmd_sam_create_dom_user(struct client_info *info) uint32 user_rid; POLICY_HND sam_pol; POLICY_HND pol_dom; + uint16 acb_info; sid_copy(&sid1, &info->dom.level5_sid); sid_to_string(sid, &sid1); @@ -1631,7 +1632,14 @@ void cmd_sam_create_dom_user(struct client_info *info) acct_desc[0] = 0; } - + if (acct_name[strlen(acct_name)-1] == '$') + { + acb_info = ACB_WSTRUST; + } + else + { + acb_info = ACB_NORMAL; + } report(out_hnd, "SAM Create Domain User\n"); report(out_hnd, "Domain: %s Name: %s Description: %s\n", domain, acct_name, acct_desc); @@ -1652,7 +1660,7 @@ void cmd_sam_create_dom_user(struct client_info *info) /* create a domain user */ res1 = res ? create_samr_domain_user(smb_cli, fnum, &pol_dom, - acct_name, ACB_NORMAL, &user_rid) : False; + acct_name, acb_info, &user_rid) : False; res = res ? samr_close(smb_cli, fnum, &pol_dom) : False; -- cgit