diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-02-26 11:29:56 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-02-26 11:29:56 +0000 |
commit | d9819ec090bb533b79a257daa3461045c2422c05 (patch) | |
tree | 7569115240c6727ef4590b1bd854650a2093c207 /source3/utils/net.c | |
parent | e692b991d1c706261bf8efe16d9f8eedae8b1b3d (diff) | |
download | samba-d9819ec090bb533b79a257daa3461045c2422c05.tar.gz samba-d9819ec090bb533b79a257daa3461045c2422c05.tar.bz2 samba-d9819ec090bb533b79a257daa3461045c2422c05.zip |
Implement 'net groupmap set' and 'net groupmap cleanup'.
I was rather annoyed by the net groupmap syntax, I could never get it
right.
net groupmap set "domain admins" domadm
creates a mapping,
net groupmap set "domain admins" -C "Comment" -N "newntname"
should also do what you expect. I'd like to have some feedback on the usability
of this.
net groupmap cleanup
solves a problem I've had two times now: Our SID changed, and a user's primary
group was mapped to a SID that is not ours. net groupmap cleanup removes all
mappings that are not from our domain sid.
Volker
(This used to be commit eb4d4faff8c14e999f414ca5b6e8c25a558859c8)
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r-- | source3/utils/net.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index 01f56b8a0c..8004ced43e 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -73,6 +73,10 @@ int opt_flags = -1; int opt_timeout = 0; const char *opt_target_workgroup = NULL; int opt_machine_pass = 0; +BOOL opt_localgroup = False; +BOOL opt_domaingroup = False; +const char *opt_newntname = ""; +int opt_rid = 0; BOOL opt_have_ip = False; struct in_addr opt_dest_ip; @@ -680,6 +684,13 @@ static struct functable net_func[] = { {"timeout", 't', POPT_ARG_INT, &opt_timeout}, {"machine-pass",'P', POPT_ARG_NONE, &opt_machine_pass}, {"myworkgroup", 'W', POPT_ARG_STRING, &opt_workgroup}, + + /* Options for 'net groupmap set' */ + {"local", 'L', POPT_ARG_NONE, &opt_localgroup}, + {"domain", 'D', POPT_ARG_NONE, &opt_domaingroup}, + {"ntname", 'N', POPT_ARG_STRING, &opt_newntname}, + {"rid", 'R', POPT_ARG_INT, &opt_rid}, + POPT_COMMON_SAMBA { 0, 0, 0, 0} }; |