preparing for release of alpha.1.4
[Samba.git] / source / rpcclient / samedit_cmds.c
blob5103da129faa6d0b8922f55f87980eaed7055656
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB client
5 Copyright (C) Andrew Tridgell 1994-2000
6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include "includes.h"
24 #include "ntdomain.h"
25 #include "rpcclient.h"
27 /****************************************************************************
28 This defines the commands supported by this client
29 ****************************************************************************/
30 static const struct command_set sam_commands[] = {
32 * sam
36 "lookupdomain",
37 cmd_sam_lookup_domain,
38 "Obtain SID for a local domain",
39 {NULL, NULL}
42 "samlookuprids",
43 cmd_sam_lookup_rids,
44 "[-d <domain>] <rid> [<rid> ...]\n" "\tLookup RIDs in SAM",
45 {NULL, NULL}
48 "samlookupnames",
49 cmd_sam_lookup_names,
50 "[-d <domain>] <name> [<name> ...]\n" "\tLookup Names in SAM",
51 {NULL, NULL}
54 "enumusers",
55 cmd_sam_enum_users,
56 "SAM User Database Query (experimental!)",
57 {NULL, NULL}
60 "addgroupmem",
61 cmd_sam_add_groupmem,
62 "<group rid> [user] [user] ... SAM Add Domain Group Member",
63 {complete_samenum_grp, complete_samenum_usr}
67 "addaliasmem",
68 cmd_sam_add_aliasmem,
69 "<alias rid> [member sid1] [member sid2] ... SAM Add Domain Alias Member",
70 {complete_samenum_als, NULL}
73 "delgroupmem",
74 cmd_sam_del_groupmem,
75 "<group rid> [user] [user] ... SAM Delete Domain Group Member",
76 {complete_samenum_grp, complete_samenum_usr}
79 "delaliasmem",
80 cmd_sam_del_aliasmem,
81 "<alias rid> [member sid1] [member sid2] ... SAM Delete Domain Alias Member",
82 {complete_samenum_als, NULL}
85 "creategroup",
86 cmd_sam_create_dom_group,
87 "SAM Create Domain Group",
88 {NULL, NULL}
91 "createalias",
92 cmd_sam_create_dom_alias,
93 "SAM Create Domain Alias",
94 {NULL, NULL}
97 "createuser",
98 cmd_sam_create_dom_user,
99 "<username> SAM Create Domain User",
100 {NULL, NULL}
103 "deluser",
104 cmd_sam_delete_dom_user,
105 "SAM Delete Domain User",
106 {complete_samenum_usr, NULL}
109 "delgroup",
110 cmd_sam_delete_dom_group,
111 "SAM Delete Domain Group",
112 {complete_samenum_grp, NULL}
115 "delalias",
116 cmd_sam_delete_dom_alias,
117 "SAM Delete Domain Alias",
118 {complete_samenum_als, NULL}
121 "ntpass",
122 cmd_sam_ntchange_pwd,
123 "NT SAM Password Change",
124 {NULL, NULL}
127 "samquerysec",
128 cmd_sam_query_sec_obj,
129 "<username>",
130 {complete_samenum_usr, NULL}
133 "samuserset2",
134 cmd_sam_set_userinfo2,
135 "<username> [-s acb_bits] SAM User Set Info 2 (experimental!)",
136 {complete_samenum_usr, NULL}
139 "samuserset",
140 cmd_sam_set_userinfo,
141 "<username> [-p password] SAM User Set Info (experimental!)",
142 {complete_samenum_usr, NULL}
145 "samuser",
146 cmd_sam_query_user,
147 "<username> [-g] [-u] [-a] SAM User Query (experimental!)",
148 {complete_samenum_usr, NULL}
151 "samgroup",
152 cmd_sam_query_group,
153 "<groupname> SAM Group Query (experimental!)",
154 {complete_samenum_grp, NULL}
157 "samalias",
158 cmd_sam_query_alias,
159 "<aliasname> SAM Alias Query",
160 {complete_samenum_als, NULL}
163 "samaliasmem",
164 cmd_sam_query_aliasmem,
165 "<aliasname> SAM Alias Members",
166 {complete_samenum_als, NULL}
169 "samgroupmem",
170 cmd_sam_query_groupmem,
171 "SAM Group Members",
172 {complete_samenum_grp, NULL}
175 "samtest",
176 cmd_sam_test,
177 "SAM User Encrypted RPC test (experimental!)",
178 {NULL, NULL}
181 "enumaliases",
182 cmd_sam_enum_aliases,
183 "SAM Aliases Database Query (experimental!)",
184 {NULL, NULL}
187 "enumdomains",
188 cmd_sam_enum_domains,
189 "SAM Domains Database Query (experimental!)",
190 {NULL, NULL}
193 "enumgroups",
194 cmd_sam_enum_groups,
195 "SAM Group Database Query (experimental!)",
196 {NULL, NULL}
199 "dominfo",
200 cmd_sam_query_dominfo,
201 "SAM Query Domain Info",
202 {NULL, NULL}
205 "dispinfo",
206 cmd_sam_query_dispinfo,
207 "SAM Query Display Info",
208 {NULL, NULL}
212 * oop!
217 NULL,
218 NULL,
219 {NULL, NULL}
223 void add_sam_commands(void)
225 add_command_set(sam_commands);