2 Unix SMB/Netbios implementation.
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.
25 #include "rpcclient.h"
27 /****************************************************************************
28 This defines the commands supported by this client
29 ****************************************************************************/
30 static const struct command_set sam_commands
[] = {
37 cmd_sam_lookup_domain
,
38 "Obtain SID for a local domain",
44 "[-d <domain>] <rid> [<rid> ...]\n" "\tLookup RIDs in SAM",
50 "[-d <domain>] <name> [<name> ...]\n" "\tLookup Names in SAM",
56 "SAM User Database Query (experimental!)",
62 "<group rid> [user] [user] ... SAM Add Domain Group Member",
63 {complete_samenum_grp
, complete_samenum_usr
}
69 "<alias rid> [member sid1] [member sid2] ... SAM Add Domain Alias Member",
70 {complete_samenum_als
, NULL
}
75 "<group rid> [user] [user] ... SAM Delete Domain Group Member",
76 {complete_samenum_grp
, complete_samenum_usr
}
81 "<alias rid> [member sid1] [member sid2] ... SAM Delete Domain Alias Member",
82 {complete_samenum_als
, NULL
}
86 cmd_sam_create_dom_group
,
87 "SAM Create Domain Group",
92 cmd_sam_create_dom_alias
,
93 "SAM Create Domain Alias",
98 cmd_sam_create_dom_user
,
99 "<username> SAM Create Domain User",
104 cmd_sam_delete_dom_user
,
105 "SAM Delete Domain User",
106 {complete_samenum_usr
, NULL
}
110 cmd_sam_delete_dom_group
,
111 "SAM Delete Domain Group",
112 {complete_samenum_grp
, NULL
}
116 cmd_sam_delete_dom_alias
,
117 "SAM Delete Domain Alias",
118 {complete_samenum_als
, NULL
}
122 cmd_sam_ntchange_pwd
,
123 "NT SAM Password Change",
128 cmd_sam_query_sec_obj
,
130 {complete_samenum_usr
, NULL
}
134 cmd_sam_set_userinfo2
,
135 "<username> [-s acb_bits] SAM User Set Info 2 (experimental!)",
136 {complete_samenum_usr
, NULL
}
140 cmd_sam_set_userinfo
,
141 "<username> [-p password] SAM User Set Info (experimental!)",
142 {complete_samenum_usr
, NULL
}
147 "<username> [-g] [-u] [-a] SAM User Query (experimental!)",
148 {complete_samenum_usr
, NULL
}
153 "<groupname> SAM Group Query (experimental!)",
154 {complete_samenum_grp
, NULL
}
159 "<aliasname> SAM Alias Query",
160 {complete_samenum_als
, NULL
}
164 cmd_sam_query_aliasmem
,
165 "<aliasname> SAM Alias Members",
166 {complete_samenum_als
, NULL
}
170 cmd_sam_query_groupmem
,
172 {complete_samenum_grp
, NULL
}
177 "SAM User Encrypted RPC test (experimental!)",
182 cmd_sam_enum_aliases
,
183 "SAM Aliases Database Query (experimental!)",
188 cmd_sam_enum_domains
,
189 "SAM Domains Database Query (experimental!)",
195 "SAM Group Database Query (experimental!)",
200 cmd_sam_query_dominfo
,
201 "SAM Query Domain Info",
206 cmd_sam_query_dispinfo
,
207 "SAM Query Display Info",
223 void add_sam_commands(void)
225 add_command_set(sam_commands
);