mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s4:samdb.py - use a more standard way to get to the domain realm/dns name
We do always use the canonical name as a base if we don't have it around yet.
This commit is contained in:
parent
87fd2fd157
commit
8c4f6bcd67
@ -274,7 +274,8 @@ member: %s
|
||||
|
||||
user_dn = "CN=%s,%s,%s" % (cn, (userou or "CN=Users"), self.domain_dn())
|
||||
|
||||
user_principal_name = "%s@%s" % (username, self.domain_dn().replace("DC=", "").replace(",", "."))
|
||||
dnsdomain = ldb.Dn(self, self.domain_dn()).canonical_str().replace("/", "")
|
||||
user_principal_name = "%s@%s" % (username, dnsdomain)
|
||||
# The new user record. Note the reliance on the SAMLDB module which
|
||||
# fills in the default informations
|
||||
ldbmessage = {"dn": user_dn,
|
||||
|
Loading…
x
Reference in New Issue
Block a user