mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s4:samldb LDB module - it isn't allowed to create user/computer accounts with a primary group specified
It can only be changed afterwards. We allow a "relax"ed exception for the provision state since we need this for the guest account. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
2e913994f2
commit
679eb33e79
@ -1240,16 +1240,15 @@ objectClass: container
|
||||
self.delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
|
||||
|
||||
# Try to Create a user with a valid primary group
|
||||
# TODO Some more investigation needed here
|
||||
# try:
|
||||
# ldb.add({
|
||||
# "dn": "cn=ldaptestuser,cn=users," + self.base_dn,
|
||||
# "objectclass": ["user", "person"],
|
||||
# "primaryGroupID": str(group_rid_1)})
|
||||
# self.fail()
|
||||
# except LdbError, (num, _):
|
||||
# self.assertEquals(num, ERR_UNWILLING_TO_PERFORM)
|
||||
# self.delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
|
||||
try:
|
||||
ldb.add({
|
||||
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
|
||||
"objectclass": ["user", "person"],
|
||||
"primaryGroupID": str(group_rid_1)})
|
||||
self.fail()
|
||||
except LdbError, (num, _):
|
||||
self.assertEquals(num, ERR_UNWILLING_TO_PERFORM)
|
||||
self.delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
|
||||
|
||||
# Test to see how we should behave when the user account doesn't
|
||||
# exist
|
||||
|
Reference in New Issue
Block a user