1
0
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:
Lukasz Zalewski
2010-06-08 20:33:56 +01:00
committed by Jelmer Vernooij
parent c58c0c2129
commit 214133fbec
2 changed files with 83 additions and 80 deletions

View File

@ -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"""