diff options
| author | David Mulder <dmulder@suse.com> | 2020-08-25 14:16:30 -0600 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2021-06-22 01:14:37 +0000 |
| commit | 4602f4fc1b537e74fdee8d9f1a390a4ea1ba18d5 (patch) | |
| tree | 20a543542088bffd2bf6cf52c302fcbbd3fbb8d7 /python | |
| parent | 43ab8a4a1b4152ae86e3dad23f10b40d4f61fb89 (diff) | |
| download | samba-4602f4fc1b537e74fdee8d9f1a390a4ea1ba18d5.tar.gz samba-4602f4fc1b537e74fdee8d9f1a390a4ea1ba18d5.tar.bz2 samba-4602f4fc1b537e74fdee8d9f1a390a4ea1ba18d5.zip | |
samdb: Create group in wellknown user container
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9143
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/samdb.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/samba/samdb.py b/python/samba/samdb.py index 2374505575b..979cf6d3592 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -228,7 +228,12 @@ lockoutTime: 0 :param sd: security descriptor of the object """ - group_dn = "CN=%s,%s,%s" % (groupname, (groupou or "CN=Users"), self.domain_dn()) + if groupou: + group_dn = "CN=%s,%s,%s" % (groupname, groupou, self.domain_dn()) + else: + group_dn = "CN=%s,%s" % (groupname, self.get_wellknown_dn( + self.get_default_basedn(), + dsdb.DS_GUID_USERS_CONTAINER)) # The new user record. Note the reliance on the SAMLDB module which # fills in the default information |
