{"time", "get remote server's time\n", net_time, net_time_usage},
{"join", "join a domain\n", net_join, net_join_usage},
{"samdump", "dump the sam of a domain\n", net_samdump, net_samdump_usage},
+ {"export", "dump the sam of this domain\n", net_export, net_export_usage},
{"vampire", "join and syncronise an AD domain onto the local server\n", net_vampire, net_vampire_usage},
{"samsync", "synchronise into the local ldb the sam of an NT4 domain\n", net_samsync_ldb, net_samsync_ldb_usage},
{"user", "manage user accounts\n", net_user, net_user_usage},
+ {"machinepw", "Get a machine password out of our SAM\n", net_machinepw, net_machinepw_usage},
{NULL, NULL, NULL, NULL}
};
d_printf("Available commands:\n");
while (name && desc) {
- d_printf("\t%s\t\t%s", name, desc);
+ if (strlen(name) > 7) {
+ d_printf("\t%s\t%s", name, desc);
+ } else {
+ d_printf("\t%s\t\t%s", name, desc);
+ }
name = ftable[++i].name;
desc = ftable[i].desc;
}
{
d_printf("Usage:\n");
d_printf("net <command> [options]\n");
+ d_printf("Type 'net help' for all available commands\n");
return 0;
}
int rc;
int argc_new;
const char **argv_new;
- struct event_context *ev;
+ struct tevent_context *ev;
struct net_context *ctx = NULL;
poptContext pc;
struct poptOption long_options[] = {
return net_usage(ctx, argc, argv);
}
- dcerpc_init();
+ dcerpc_init(cmdline_lp_ctx);
- ev = event_context_init(NULL);
+ ev = s4_event_context_init(NULL);
if (!ev) {
d_printf("Failed to create an event context\n");
exit(1);