mirror of
https://github.com/samba-team/samba.git
synced 2025-07-18 00:59:12 +03:00
Modifications extending functionality of newuser cmd and new net group set of commands for group related operations on ldb
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
This commit is contained in:
committed by
Jelmer Vernooij
parent
c58c0c2129
commit
214133fbec
@ -70,7 +70,7 @@ class cmd_group_add(Command):
|
||||
versionopts=None, H=None, groupou=None, group_scope=None,
|
||||
group_type=None, description=None, mail_address=None, notes=None):
|
||||
|
||||
if cmp((group_type or "Security"), "Security") == 0:
|
||||
if (group_type or "Security") == "Security":
|
||||
gtype = security_group.get(group_scope, GTYPE_SECURITY_GLOBAL_GROUP)
|
||||
else:
|
||||
gtype = distribution_group.get(group_scope, GTYPE_DISTRIBUTION_GLOBAL_GROUP)
|
||||
@ -87,6 +87,7 @@ class cmd_group_add(Command):
|
||||
raise CommandError('Failed to create group "%s" : %s' % (
|
||||
groupname, msg))
|
||||
|
||||
|
||||
class cmd_group_delete(Command):
|
||||
"""Delete a group"""
|
||||
|
||||
@ -117,6 +118,7 @@ class cmd_group_delete(Command):
|
||||
raise CommandError('Failed to remove group "%s": %s' % (
|
||||
groupname , msg))
|
||||
|
||||
|
||||
class cmd_group_add_members(Command):
|
||||
"""Add (comma-separated list of) group members"""
|
||||
|
||||
@ -148,6 +150,7 @@ class cmd_group_add_members(Command):
|
||||
raise CommandError('Failed to add members "%s" to group "%s": %s' % (
|
||||
listofmembers, groupname , msg))
|
||||
|
||||
|
||||
class cmd_group_remove_members(Command):
|
||||
"""Remove (comma-separated list of) group members"""
|
||||
|
||||
@ -179,6 +182,7 @@ class cmd_group_remove_members(Command):
|
||||
raise CommandError('Failed to remove members "%s" from group "%s": %s' % (
|
||||
listofmembers, groupname , msg))
|
||||
|
||||
|
||||
class cmd_group(SuperCommand):
|
||||
"""Group management"""
|
||||
|
||||
|
Reference in New Issue
Block a user