summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/samdb.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index a40d10d807..60dc2fe87e 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -274,10 +274,12 @@ 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(",", "."))
# The new user record. Note the reliance on the SAMLDB module which
# fills in the default informations
ldbmessage = {"dn": user_dn,
"sAMAccountName": username,
+ "userPrincipalName": user_principal_name,
"objectClass": "user"}
if surname is not None: