summaryrefslogtreecommitdiff
path: root/source3/utils/net_help.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-04-19 05:53:55 +0000
committerGerald Carter <jerry@samba.org>2003-04-19 05:53:55 +0000
commita1fb9f217659b0954ba0966f917de5276f86c85f (patch)
tree48af6e7d583d348ad209041223a2f9a36296dd37 /source3/utils/net_help.c
parenta53c63f99e2ada1f172c8e942af2666d8862fa49 (diff)
downloadsamba-a1fb9f217659b0954ba0966f917de5276f86c85f.tar.gz
samba-a1fb9f217659b0954ba0966f917de5276f86c85f.tar.bz2
samba-a1fb9f217659b0954ba0966f917de5276f86c85f.zip
Merging smbgroupedit into 'net groupmap'. Not entirely done.
Need to check on where the privilege code is sitting and update the docs. Examples: root# bin/net help groupmap net groupmap add Create a new group mapping net groupmap modify Update a group mapping net groupmap delete Remove a group mapping net groupmap list List current group map # bin/net groupmap add Usage: net groupmap add rid=<int> name=<string> type=<domain|local|builtin> [comment=<string>] # bin/net groupmap delete Usage: net groupmap delete name=<string|SID> # bin/net groupmap modify Usage: net groupmap modify name=<string|SID> [comment=<string>] [type=<domain|local> (This used to be commit f2fd0ab41ffbc0355db95529b6bda1b21aa4860a)
Diffstat (limited to 'source3/utils/net_help.c')
-rw-r--r--source3/utils/net_help.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/utils/net_help.c b/source3/utils/net_help.c
index 07409aec22..f24367f246 100644
--- a/source3/utils/net_help.c
+++ b/source3/utils/net_help.c
@@ -99,6 +99,25 @@ int net_help_group(int argc, const char **argv)
return -1;
}
+int net_help_groupmap(int argc, const char **argv)
+{
+ if (getuid() != 0) {
+ d_printf("You must be root to edit group mappings.\nExiting...\n");
+ return -1;
+ }
+
+ d_printf("net groupmap add"\
+ "\n Create a new group mapping\n");
+ d_printf("net groupmap modify"\
+ "\n Update a group mapping\n");
+ d_printf("net groupmap delete"\
+ "\n Remove a group mapping\n");
+ d_printf("net groupmap list"\
+ "\n List current group map\n");
+
+ return -1;
+}
+
int net_help_join(int argc, const char **argv)
{
@@ -152,6 +171,7 @@ static int net_usage(int argc, const char **argv)
" 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 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 name\n"\
@@ -184,6 +204,7 @@ int net_help(int argc, const char **argv)
{"PRINTQ", net_rap_printq_usage},
{"USER", net_help_user},
{"GROUP", net_help_group},
+ {"GROUPMAP", net_help_groupmap},
{"JOIN", net_help_join},
{"VALIDATE", net_rap_validate_usage},
{"GROUPMEMBER", net_rap_groupmember_usage},