mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
Addition of userPrincipalName attribute when new account is created
This commit is contained in:
committed by
Matthias Dieter Wallnöfer
parent
73d6bb7447
commit
87fd2fd157
@ -274,10 +274,12 @@ member: %s
|
|||||||
|
|
||||||
user_dn = "CN=%s,%s,%s" % (cn, (userou or "CN=Users"), self.domain_dn())
|
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(",", "."))
|
||||||
# The new user record. Note the reliance on the SAMLDB module which
|
# The new user record. Note the reliance on the SAMLDB module which
|
||||||
# fills in the default informations
|
# fills in the default informations
|
||||||
ldbmessage = {"dn": user_dn,
|
ldbmessage = {"dn": user_dn,
|
||||||
"sAMAccountName": username,
|
"sAMAccountName": username,
|
||||||
|
"userPrincipalName": user_principal_name,
|
||||||
"objectClass": "user"}
|
"objectClass": "user"}
|
||||||
|
|
||||||
if surname is not None:
|
if surname is not None:
|
||||||
|
Reference in New Issue
Block a user