From 7662d5040a9c329eb5ba68bc4514aa92813177ce Mon Sep 17 00:00:00 2001 From: Marc Muehlfeld Date: Sun, 7 Jun 2015 20:35:20 +0200 Subject: [PATCH] Group creation: Add msSFU30Name only when --nis-domain was given This fixes a bug, that all new created groups automatically get an msSFU30Name attribute added. This should only be the case, when we also have a nis-domain (samba-tool --nis-domain=...). Bugreport: https://bugzilla.samba.org/show_bug.cgi?id=11315 Signed-off-by: Marc Muehlfeld --- python/samba/samdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/samba/samdb.py b/python/samba/samdb.py index e74e823..2f682a9 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -191,7 +191,8 @@ pwdLastSet: 0 "sAMAccountName": groupname, "objectClass": "group"} - ldbmessage["msSFU30Name"] = groupname + if nisdomain is not None: + ldbmessage["msSFU30Name"] = groupname if grouptype is not None: ldbmessage["groupType"] = normalise_int32(grouptype) -- 2.4.2