-
- return net_run_function(c, argc, argv, func, rpc_printer_usage);
-}
-
-/****************************************************************************/
-
-
-/**
- * Basic usage function for 'net rpc'
- *
- * @param c A net_context structure
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
- **/
-
-int net_rpc_usage(struct net_context *c, int argc, const char **argv)
-{
- d_printf(" net rpc info \t\t\tshow basic info about a domain \n");
- d_printf(" net rpc join \t\t\tto join a domain \n");
- d_printf(" net rpc oldjoin \t\tto join a domain created in server manager\n");
- d_printf(" net rpc testjoin \t\ttests that a join is valid\n");
- d_printf(" net rpc user \t\t\tto add, delete and list users\n");
- d_printf(" net rpc password <username> [<password>] -Uadmin_username%%admin_pass\n");
- d_printf(" net rpc group \t\tto list groups\n");
- d_printf(" net rpc share \t\tto add, delete, list and migrate shares\n");
- d_printf(" net rpc printer \t\tto list and migrate printers\n");
- d_printf(" net rpc file \t\t\tto list open files\n");
- d_printf(" net rpc changetrustpw \tto change the trust account password\n");
- d_printf(" net rpc getsid \t\tfetch the domain sid into the local secrets.tdb\n");
- d_printf(" net rpc vampire \t\tsyncronise an NT PDC's users and groups into the local passdb\n");
- d_printf(" net rpc samdump \t\tdisplay an NT PDC's users, groups and other data\n");
- d_printf(" net rpc trustdom \t\tto create trusting domain's account or establish trust\n");
- d_printf(" net rpc abortshutdown \tto abort the shutdown of a remote server\n");
- d_printf(" net rpc shutdown \t\tto shutdown a remote server\n");
- d_printf(" net rpc rights\t\tto manage privileges assigned to SIDs\n");
- d_printf(" net rpc registry\t\tto manage registry hives\n");
- d_printf(" net rpc service\t\tto start, stop and query services\n");
- d_printf(" net rpc audit\t\t\tto modify global auditing settings\n");
- d_printf(" net rpc shell\t\t\tto open an interactive shell for remote server/account management\n");
- d_printf("\n");
- d_printf("'net rpc shutdown' also accepts the following miscellaneous options:\n"); /* misc options */
- d_printf("\t-r or --reboot\trequest remote server reboot on shutdown\n");
- d_printf("\t-f or --force\trequest the remote server force its shutdown\n");
- d_printf("\t-t or --timeout=<timeout>\tnumber of seconds before shutdown\n");
- d_printf("\t-C or --comment=<message>\ttext message to display on impending shutdown\n");
- return -1;
-}
-
-
-/**
- * Help function for 'net rpc'. Calls command specific help if requested
- * or displays usage of net rpc
- *
- * @param c A net_context structure
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
- **/
-
-int net_rpc_help(struct net_context *c, int argc, const char **argv)
-{
- struct functable func[] = {
- {"join", rpc_join_usage},
- {"user", rpc_user_usage},
- {"group", rpc_group_usage},
- {"share", rpc_share_usage},
- /*{"changetrustpw", rpc_changetrustpw_usage}, */
- {"trustdom", rpc_trustdom_usage},
- /*{"abortshutdown", rpc_shutdown_abort_usage},*/
- /*{"shutdown", rpc_shutdown_usage}, */
- {"vampire", rpc_vampire_usage},
- {NULL, NULL}
- };
-
- if (argc == 0) {
- net_rpc_usage(c, argc, argv);
- return -1;