From c36c759452cd8600cd4a1664fb225c499a9f25c6 Mon Sep 17 00:00:00 2001 From: Marc Muehlfeld Date: Thu, 11 Jun 2015 21:20:55 +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 Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Jun 16 11:58:02 CEST 2015 on sn-devel-104 (cherry picked from commit 9df07e6f1bcea55fcdab777c3f45a1a6ca88f69e) --- python/samba/samdb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/samba/samdb.py b/python/samba/samdb.py index 564d5d0..939071f 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -191,8 +191,6 @@ pwdLastSet: 0 "sAMAccountName": groupname, "objectClass": "group"} - ldbmessage["msSFU30Name"] = groupname - if grouptype is not None: ldbmessage["groupType"] = normalise_int32(grouptype) @@ -209,6 +207,7 @@ pwdLastSet: 0 ldbmessage["gidNumber"] = normalise_int32(gidnumber) if nisdomain is not None: + ldbmessage["msSFU30Name"] = groupname ldbmessage["msSFU30NisDomain"] = nisdomain if sd is not None: -- 2.4.3