diff options
author | Gerald Carter <jerry@samba.org> | 2003-04-19 06:04:17 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-04-19 06:04:17 +0000 |
commit | 0676a942f933685184626db24b3caca57d910310 (patch) | |
tree | ae965ddca0bce2d9f369f394825ed2b53b40a380 /source3/utils/net_help.c | |
parent | 7d1ea0987d6d756fb3ceaf14c87676b3ae8d4d9b (diff) | |
download | samba-0676a942f933685184626db24b3caca57d910310.tar.gz samba-0676a942f933685184626db24b3caca57d910310.tar.bz2 samba-0676a942f933685184626db24b3caca57d910310.zip |
[merge from SAMBA_3_0]
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 0fd28bc3a803ca1ec3dcd8cc6236d4ecc3134584)
Diffstat (limited to 'source3/utils/net_help.c')
-rw-r--r-- | source3/utils/net_help.c | 21 |
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}, |