summaryrefslogtreecommitdiffstats
path: root/python/samba/samdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/samba/samdb.py')
-rw-r--r--python/samba/samdb.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/python/samba/samdb.py b/python/samba/samdb.py
index e6d99bc037..0ea52fbc2f 100644
--- a/python/samba/samdb.py
+++ b/python/samba/samdb.py
@@ -169,7 +169,8 @@ pwdLastSet: 0
self.modify_ldif(mod)
def newgroup(self, groupname, groupou=None, grouptype=None,
- description=None, mailaddress=None, notes=None, sd=None):
+ description=None, mailaddress=None, notes=None, sd=None,
+ gidnumber=None, nisdomain=None):
"""Adds a new group with additional parameters
:param groupname: Name of the new group
@@ -177,6 +178,8 @@ pwdLastSet: 0
:param description: Description of the new group
:param mailaddress: Email address of the new group
:param notes: Notes of the new group
+ :param gidnumber: GID Number of the new group
+ :param nisdomain: NIS Domain Name of the new group
:param sd: security descriptor of the object
"""
@@ -188,6 +191,8 @@ pwdLastSet: 0
"sAMAccountName": groupname,
"objectClass": "group"}
+ ldbmessage["msSFU30Name"] = groupname
+
if grouptype is not None:
ldbmessage["groupType"] = normalise_int32(grouptype)
@@ -200,6 +205,12 @@ pwdLastSet: 0
if notes is not None:
ldbmessage["info"] = notes
+ if gidnumber is not None:
+ ldbmessage["gidNumber"] = normalise_int32(gidnumber)
+
+ if nisdomain is not None:
+ ldbmessage["msSFU30NisDomain"] = nisdomain
+
if sd is not None:
ldbmessage["nTSecurityDescriptor"] = ndr_pack(sd)