mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
tests/krb5: Simplify account creation
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f2f1f3a1e9
commit
394e8db261
@ -282,15 +282,11 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
|
||||
samdb = self.get_samdb()
|
||||
user_name = "mskileusr"
|
||||
alt_name = "mskilealtsec"
|
||||
(uc, dn) = self.create_account(samdb, user_name)
|
||||
(uc, dn) = self.create_account(samdb, user_name,
|
||||
account_control=UF_DONT_REQUIRE_PREAUTH)
|
||||
realm = uc.get_realm().lower()
|
||||
alt_sec = "Kerberos:%s@%s" % (alt_name, realm)
|
||||
self.add_attribute(samdb, dn, "altSecurityIdentities", alt_sec)
|
||||
self.modify_attribute(
|
||||
samdb,
|
||||
dn,
|
||||
"userAccountControl",
|
||||
str(UF_NORMAL_ACCOUNT | UF_DONT_REQUIRE_PREAUTH))
|
||||
|
||||
mach_name = "mskilemac"
|
||||
(mc, _) = self.create_account(samdb, mach_name, machine_account=True)
|
||||
@ -660,15 +656,11 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
|
||||
samdb = self.get_samdb()
|
||||
user_name = "mskileusr"
|
||||
alt_name = "mskilealtsec"
|
||||
(uc, dn) = self.create_account(samdb, user_name)
|
||||
(uc, dn) = self.create_account(samdb, user_name,
|
||||
account_control=UF_DONT_REQUIRE_PREAUTH)
|
||||
realm = uc.get_realm().lower()
|
||||
alt_sec = "Kerberos:%s@%s" % (alt_name, realm)
|
||||
self.add_attribute(samdb, dn, "altSecurityIdentities", alt_sec)
|
||||
self.modify_attribute(
|
||||
samdb,
|
||||
dn,
|
||||
"userAccountControl",
|
||||
str(UF_NORMAL_ACCOUNT | UF_DONT_REQUIRE_PREAUTH))
|
||||
ename = alt_name + "@" + realm
|
||||
|
||||
mach_name = "mskilemac"
|
||||
|
Loading…
Reference in New Issue
Block a user