Esempio n. 1
0
int net_group_usage(struct net_context *c, int argc, const char **argv)
{
	d_printf(_("net [<method>] group [misc. options] [targets]"
		   "\n\tList user groups\n\n"));
	d_printf(_("net rpc group LIST [global|local|builtin]* [misc. options]"
		   "\n\tList specific user groups\n\n"));
	d_printf(_("net [<method>] group DELETE <name> "
		   "[misc. options] [targets]"
		   "\n\tDelete specified group\n"));
	d_printf(_("\nnet [<method>] group ADD <name> [-C comment] "
		   "[-c container] [misc. options] [targets]\n"
		   "\tCreate specified group\n"));
	d_printf(_("\nnet rpc group MEMBERS <name>\n\tList Group Members\n\n"));
	d_printf(_("\nnet rpc group ADDMEM <group> <member>\n"
		   "\tAdd Group Members\n\n"));
	d_printf(_("\nnet rpc group DELMEM <group> <member>\n"
		   "\tDelete Group Members\n\n"));
	net_common_methods_usage(c, argc, argv);
	net_common_flags_usage(c, argc, argv);
	d_printf(_("\t-C or --comment=<comment>\tdescriptive comment "
		   "(for add only)\n"));
	d_printf(_("\t-c or --container=<container>\tLDAP container, "
		   "defaults to cn=Users (for add in ADS only)\n"));
	d_printf(_("\t-L or --localgroup\t\tWhen adding groups, "
		   "create a local group (alias)\n"));
	return -1;
}
Esempio n. 2
0
static int net_usage(int argc, const char **argv)
{
	d_printf("  net time\t\tto view or set time information\n"\
		 "  net lookup\t\tto lookup host name or ip address\n"\
		 "  net user\t\tto manage users\n"\
		 "  net group\t\tto manage groups\n"\
		 "  net sam\t\tto edit the local user database directly\n"\
		 "  net lookup\t\tto look up various things\n"\
		 "  net groupmap\t\tto manage group mappings\n"\
		 "  net join\t\tto join a domain\n"\
		 "  net cache\t\tto operate on cache tdb file\n"\
		 "  net getlocalsid [NAME]\tto get the SID for local machine name\n"\
		 "  net setlocalsid SID\tto set the local machine SID\n"\
		 "  net getdomainsid the machine SID and the domain SID on the local server\n"\
		 "  net setdomainsid SID\tto set the domain SID on member servers\n"\
		 "  net changesecretpw\tto change the machine password in the local secrets database only\n"\
		 "                    \tthis requires the -f flag as a safety barrier\n"\
		 "  net status\t\tShow server status\n"\
		 "  net usersidlist\tto get a list of all users with their SIDs\n"
		 "  net usershare\t\tto add, delete and list locally user-modifiable shares\n"
		 "  net conf\t\tto view and edit samba's registry based configuration\n"
		 "\n"\
		 "  net ads <command>\tto run ADS commands\n"\
		 "  net rap <command>\tto run RAP (pre-RPC) commands\n"\
		 "  net rpc <command>\tto run RPC commands\n"\
		 "\n"\
		 "Type \"net help <option>\" to get more information on that option\n");
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 3
0
int net_help_printer(int argc, const char **argv)
{
	d_printf("net rpc printer LIST [printer] [misc. options] [targets]\n"\
		 "\tlists all printers on print-server\n\n");
	d_printf("net rpc printer DRIVER [printer] [misc. options] [targets]\n"\
		 "\tlists all printer-drivers on print-server\n\n");
	d_printf("net rpc printer PUBLISH action [printer] [misc. options] [targets]\n"\
		 "\tpublishes printer settings in Active Directory\n"
		 "\taction can be one of PUBLISH, UPDATE, UNPUBLISH or LIST\n\n");
	d_printf("net rpc printer MIGRATE PRINTERS [printer] [misc. options] [targets]"\
		 "\n\tmigrates printers from remote to local server\n\n");
	d_printf("net rpc printer MIGRATE SETTINGS [printer] [misc. options] [targets]"\
		 "\n\tmigrates printer-settings from remote to local server\n\n");
	d_printf("net rpc printer MIGRATE DRIVERS [printer] [misc. options] [targets]"\
		 "\n\tmigrates printer-drivers from remote to local server\n\n");
	d_printf("net rpc printer MIGRATE FORMS [printer] [misc. options] [targets]"\
		 "\n\tmigrates printer-forms from remote to local server\n\n");
	d_printf("net rpc printer MIGRATE SECURITY [printer] [misc. options] [targets]"\
		 "\n\tmigrates printer-ACLs from remote to local server\n\n");
	d_printf("net rpc printer MIGRATE ALL [printer] [misc. options] [targets]"\
		 "\n\tmigrates drivers, forms, queues, settings and acls from\n"\
		 "\tremote to local print-server\n\n");
	net_common_methods_usage(argc, argv);
	net_common_flags_usage(argc, argv);
	d_printf(
	 "\t-v or --verbose\t\t\tgive verbose output\n"
	 "\t      --destination\t\tmigration target server (default: localhost)\n");

	return -1;
}
Esempio n. 4
0
int net_rap_domain_usage(int argc, const char **argv)
{
	d_printf("net rap domain [misc. options] [target]\n\tlists the"\
		 " domains or workgroups visible on the current network\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 5
0
int net_rap_validate_usage(int argc, const char **argv)
{
	d_printf("net rap validate <username> [password]\n"\
		 "\tValidate user and password to check whether they"\
		 " can access target server or domain\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 6
0
int net_rap_server_usage(int argc, const char **argv)
{
	d_printf("net rap server [misc. options] [target]\n\t"\
		 "lists the servers in the specified domain or workgroup.\n");
	d_printf("\n\tIf domain is not specified, it uses the current"\
		 " domain or workgroup as\n\tthe default.\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 7
0
int net_help_join(int argc, const char **argv)
{
	d_printf("\nnet [<method>] join [misc. options]\n"
		 "\tjoins this server to a domain\n");
	d_printf("Valid methods: (auto-detected if not specified)\n");
	d_printf("\tads\t\t\t\tActive Directory (LDAP/Kerberos)\n");
	d_printf("\trpc\t\t\t\tDCE-RPC\n");
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 8
0
int net_time_usage(struct net_context *c, int argc, const char **argv)
{
	d_printf(_(
"net time\n\tdisplays time on a server (-S server)\n\n"
"net time system\n\tdisplays time on a server (-S server) in a format ready for /bin/date\n\n"
"net time set\n\truns /bin/date with the time from the server (-S server)\n\n"
"net time zone\n\tdisplays the timezone in hours from GMT on the remote server (-S server)\n\n"
"\n"));
	net_common_flags_usage(c, argc, argv);
	return -1;
}
Esempio n. 9
0
/*
  help for net ads search
*/
static int net_ads_search_usage(int argc, const char **argv)
{
	d_printf(
		"\nnet ads search <expression> <attributes...>\n"\
		"\nperform a raw LDAP search on a ADS server and dump the results\n"\
		"The expression is a standard LDAP search expression, and the\n"\
		"attributes are a list of LDAP fields to show in the results\n\n"\
		"Example: net ads search '(objectCategory=group)' sAMAccountName\n\n"
		);
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 10
0
/*
  help for net ads search
*/
static int net_ads_dn_usage(int argc, const char **argv)
{
	d_printf(
		"\nnet ads dn <dn> <attributes...>\n"\
		"\nperform a raw LDAP search on a ADS server and dump the results\n"\
		"The DN standard LDAP DN, and the attributes are a list of LDAP fields \n"\
		"to show in the results\n\n"\
		"Example: net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' sAMAccountName\n\n"
		);
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 11
0
int net_rap_groupmember_usage(int argc, const char **argv)
{
	d_printf(
	 "net rap groupmember LIST <group> [misc. options] [targets]"\
	 "\n\t Enumerate users in a group\n"\
	 "\nnet rap groupmember DELETE <group> <user> [misc. options] "\
	 "[targets]\n\t Delete sepcified user from specified group\n"\
	 "\nnet rap groupmember ADD <group> <user> [misc. options] [targets]"\
	 "\n\t Add specified user to specified group\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 12
0
int net_usershare_usage(struct net_context *c, int argc, const char **argv)
{
	d_printf(_("net usershare add <sharename> <path> [<comment>] [<acl>] [<guest_ok=[y|n]>] to "
				"add or change a user defined share.\n"
		"net usershare delete <sharename> to delete a user defined share.\n"
		"net usershare info [-l|--long] [wildcard sharename] to print info about a user defined share.\n"
		"net usershare list [-l|--long] [wildcard sharename] to list user defined shares.\n"
		"net usershare help\n"
		"\nType \"net usershare help <option>\" to get more information on that option\n\n"));

	net_common_flags_usage(c, argc, argv);
	return -1;
}
Esempio n. 13
0
int rpc_vampire_usage(struct net_context *c, int argc, const char **argv)
{
	d_printf("net rpc vampire ([ldif [<ldif-filename>] | [keytab] [<keytab-filename]) [options]\n"
		 "\t to pull accounts from a remote PDC where we are a BDC\n"
		 "\t\t no args puts accounts in local passdb from smb.conf\n"
		 "\t\t ldif - put accounts in ldif format (file defaults to "
		 "/tmp/tmp.ldif)\n"
		 "\t\t keytab - put account passwords in krb5 keytab (defaults "
		 "to system keytab)\n");

	net_common_flags_usage(c, argc, argv);
	return -1;
}
Esempio n. 14
0
int net_rap_service_usage(int argc, const char **argv)
{
	d_printf("net rap service [misc. options] [targets] \n"\
		 "\tlists all running service daemons on target server\n");
	d_printf("\nnet rap service START <name> [service startup arguments]"\
		 " [misc. options] [targets]"\
		 "\n\tStart named service on remote server\n");
	d_printf("\nnet rap service STOP <name> [misc. options] [targets]\n"\
		 "\n\tStop named service on remote server\n");
    
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 15
0
int net_help_file(int argc, const char **argv)
{
	d_printf("net [<method>] file [misc. options] [targets]\n"\
		 "\tlists all open files on file server\n\n");
	d_printf("net [<method>] file USER <username> "\
		 "[misc. options] [targets]"\
		 "\n\tlists all files opened by username on file server\n\n");
	d_printf("net [<method>] file CLOSE <id> [misc. options] [targets]\n"\
		 "\tcloses specified file on target server\n\n");
	d_printf("net [rap] file INFO <id> [misc. options] [targets]\n"\
		 "\tdisplays information about the specified open file\n");

	net_common_methods_usage(argc, argv);
	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 16
0
int net_rap_printq_usage(int argc, const char **argv)
{
	d_printf(
	 "net rap printq [misc. options] [targets]\n"\
	 "\tor\n"\
	 "net rap printq info [<queue_name>] [misc. options] [targets]\n"\
	 "\tlists the specified queue and jobs on the target server.\n"\
	 "\tIf the queue name is not specified, all queues are listed.\n\n");
	d_printf(
	 "net rap printq delete [<queue name>] [misc. options] [targets]\n"\
	 "\tdeletes the specified job number on the target server, or the\n"\
	 "\tprinter queue if no job number is specified\n");

	net_common_flags_usage(argc, argv);

	return -1;
}	
Esempio n. 17
0
int net_rap_session_usage(int argc, const char **argv)
{
	d_printf(
	 "\nnet rap session [misc. options] [targets]"\
	 "\n\tenumerates all active SMB/CIFS sessions on target server\n");
	d_printf(
	 "\nnet rap session DELETE <client_name> [misc. options] [targets] \n"\
	 "\tor"\
	 "\nnet rap session CLOSE <client_name> [misc. options] [targets]"\
	 "\n\tDeletes (closes) a session from specified client to server\n");
	d_printf(
	"\nnet rap session INFO <client_name>"\
	"\n\tEnumerates all open files in specified session\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 18
0
int net_rap_usage(int argc, const char **argv)
{
	d_printf("  net rap domain \tto list domains \n"\
		 "  net rap file \t\tto list open files on a server \n"\
		 "  net rap group \tto list user groups  \n"\
		 "  net rap groupmember \tto list users in a group \n"\
		 "  net rap password \tto change the password of a user\n"\
		 "  net rap printq \tto list the print queues on a server\n"\
		 "  net rap server \tto list servers in a domain\n"\
		 "  net rap session \tto list clients with open sessions to a server\n"\
		 "  net rap share \tto list shares exported by a server\n"\
		 "  net rap user \t\tto list users\n"\
		 "  net rap validate \tto check whether a user and the corresponding password are valid\n"\
		 "  net rap help\n"\
		 "\nType \"net help <option>\" to get more information on that option\n\n");

	net_common_flags_usage(argc, argv);
	return -1;
}
Esempio n. 19
0
static int net_usage(struct net_context *c, int argc, const char **argv)
{
	struct functable *table = (struct functable*) c->private_data;
	int i;

	d_printf(_("Usage:\n"));
	for (i=0; table[i].funcname != NULL; i++) {
		if (c->display_usage) {
			d_printf(_("net %s usage:\n"), table[i].funcname);
			d_printf("\n%s\n\n", table[i].usage);
		} else {
			d_printf("%s %-15s %s\n", "net", table[i].funcname,
				 table[i].description);
		}

	}

	net_common_flags_usage(c, argc, argv);
	return -1;
}
Esempio n. 20
0
int net_help_user(int argc, const char **argv)
{
	d_printf("\nnet [<method>] user [misc. options] [targets]"\
		 "\n\tList users\n\n");
	d_printf("net [<method>] user DELETE <name> [misc. options] [targets]"\
		 "\n\tDelete specified user\n");
	d_printf("\nnet [<method>] user INFO <name> [misc. options] [targets]"\
		 "\n\tList the domain groups of the specified user\n");
	d_printf("\nnet [<method>] user ADD <name> [password] [-c container] "\
		 "[-F user flags] [misc. options]"\
		 " [targets]\n\tAdd specified user\n");
	d_printf("\nnet [<method>] user RENAME <oldusername> <newusername>"\
		 " [targets]\n\tRename specified user\n\n");


	net_common_methods_usage(argc, argv);
	net_common_flags_usage(argc, argv);
	d_printf("\t-C or --comment=<comment>\tdescriptive comment (for add only)\n");
	d_printf("\t-c or --container=<container>\tLDAP container, defaults to cn=Users (for add in ADS only)\n");
	return -1;
}
Esempio n. 21
0
int net_help_share(int argc, const char **argv)
{
	d_printf(
	 "\nnet [<method>] share [misc. options] [targets] \n"
	 "\tenumerates all exported resources (network shares) "
	 "on target server\n\n"
	 "net [<method>] share ADD <name=serverpath> [misc. options] [targets]"
	"\n\tadds a share from a server (makes the export active)\n\n"
	"net [<method>] share DELETE <sharename> [misc. options] [targets]"
	"\n\tdeletes a share from a server (makes the export inactive)\n\n"
	"net [<method>] share ALLOWEDUSERS [<filename>] "
	"[misc. options] [targets]"
	"\n\tshows a list of all shares together with all users allowed to"
	"\n\taccess them. This needs the output of 'net usersidlist' on"
	"\n\tstdin or in <filename>.\n\n"
	 "net [<method>] share MIGRATE FILES <sharename> [misc. options] [targets]"
	 "\n\tMigrates files from remote to local server\n\n"
	 "net [<method>] share MIGRATE SHARES <sharename> [misc. options] [targets]"
	 "\n\tMigrates shares from remote to local server\n\n"
/*	 "net [<method>] share MIGRATE SECURITY <sharename> [misc. options] [targets]"
	 "\n\tMigrates share-ACLs from remote to local server\n\n" */
	 "net [<method>] share MIGRATE ALL <sharename> [misc. options] [targets]"
	 "\n\tMigrates shares (including directories, files) from remote\n"
	 "\tto local server\n\n"
	);
	net_common_methods_usage(argc, argv);
	net_common_flags_usage(argc, argv);
	d_printf(
	 "\t-C or --comment=<comment>\tdescriptive comment (for add only)\n"
	 "\t-M or --maxusers=<num>\t\tmax users allowed for share\n"
	 "\t      --acls\t\t\tcopies ACLs as well\n"
	 "\t      --attrs\t\t\tcopies DOS Attributes as well\n"
	 "\t      --timestamps\t\tpreserve timestamps while copying files\n"
	 "\t      --destination\t\tmigration target server (default: localhost)\n"
	 "\t-e or --exclude\t\t\tlist of shares to be excluded from mirroring\n"
	 "\t-v or --verbose\t\t\tgive verbose output\n");
	return -1;
}