summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/netcmd/group.py
diff options
context:
space:
mode:
authorLukasz Zalewski <lukas@eecs.qmul.ac.uk>2010-06-08 20:33:56 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-06-20 01:29:03 +0200
commit214133fbec27c4ed42bb8c527e1365a321de0fbf (patch)
tree04670b9ee3b78e8479a58b3099b194587a868cfd /source4/scripting/python/samba/netcmd/group.py
parentc58c0c2129b1df7b5eeb984bed4a09f2ecdfc2b1 (diff)
downloadsamba-214133fbec27c4ed42bb8c527e1365a321de0fbf.tar.gz
samba-214133fbec27c4ed42bb8c527e1365a321de0fbf.tar.bz2
samba-214133fbec27c4ed42bb8c527e1365a321de0fbf.zip
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>
Diffstat (limited to 'source4/scripting/python/samba/netcmd/group.py')
-rw-r--r--source4/scripting/python/samba/netcmd/group.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/group.py b/source4/scripting/python/samba/netcmd/group.py
index 3d85a17390..41506bb205 100644
--- a/source4/scripting/python/samba/netcmd/group.py
+++ b/source4/scripting/python/samba/netcmd/group.py
@@ -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"""