diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-23 18:57:07 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-23 18:57:07 +0000 |
commit | 7bd8fd1a102045de38e0e0471e2cf7e2aee47eda (patch) | |
tree | 4292a09ba448e990eb96b71d4f3e6587cb0d6bcb /source3/rpcclient | |
parent | 4c4af2ba5ec3c1496576fe88331346cc631699e5 (diff) | |
download | samba-7bd8fd1a102045de38e0e0471e2cf7e2aee47eda.tar.gz samba-7bd8fd1a102045de38e0e0471e2cf7e2aee47eda.tar.bz2 samba-7bd8fd1a102045de38e0e0471e2cf7e2aee47eda.zip |
adding svcctl 0x1b function
(This used to be commit d5869df3716fec21d3a4237dbf5d2417d3350e11)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index fd1e3595cb..0d714a7523 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -657,6 +657,84 @@ void cmd_sam_add_aliasmem(struct client_info *info, int argc, char *argv[]) } +#if 0 +/**************************************************************************** +SAM create domain user. +****************************************************************************/ +void cmd_sam_create_dom_trusting(struct client_info *info, int argc, char *argv[]) +{ + fstring local_domain; + fstring local_pdc; + + char *trusting_domain; + char *trusting_pdc; + fstring password; + + fstring sid; + DOM_SID sid1; + uint32 user_rid; + + sid_copy(&sid1, &info->dom.level5_sid); + sid_to_string(sid, &sid1); + fstrcpy(domain, info->dom.level5_dom); + + if (sid1.num_auths == 0) + { + report(out_hnd, "please use 'lsaquery' first, to ascertain the SID\n"); + return; + } + + if (argc < 3) + { + report(out_hnd, "createtrusting: <Domain Name> <PDC Name> [password]\n"); + return; + } + + argc--; + argv++; + + trusting_domain = argv[0]; + + argc--; + argv++; + + trusting_pdc = argv[0]; + + argc--; + argv++; + + if (argc > 0) + { + safe_strcpy(password, argv[0], sizeof(password)-1); + } + else + { + fstring pass_str; + char *pass; + slprintf(pass_str, sizeof(pass_str)-1, "Enter %s's Password:", + user_name); + pass = (char*)getpass(pass_str); + + if (pass != NULL) + { + safe_strcpy(password, pass, sizeof(password)-1); + set_passwd = True; + } + } + report(out_hnd, "SAM Create Domain Trusting Account\n"); + + if (msrpc_sam_create_dom_user(smb_cli, &sid1, + acct_name, ACB_WSTRUST, &user_rid)) + { + report(out_hnd, "Create Domain User: OK\n"); + } + else + { + report(out_hnd, "Create Domain User: FAILED\n"); + } +} +#endif + /**************************************************************************** SAM create domain user. ****************************************************************************/ |