summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorLukasz Zalewski <lukas@eecs.qmul.ac.uk>2010-10-16 19:51:09 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-19 09:21:04 +0000
commit87fd2fd1574d4cb52aef216e632e9899a01b2940 (patch)
tree32484e2b18064a46b5dd5de39a321faebd57deac /source4/scripting/python
parent73d6bb74476561ef0140d21810541825c44b44a4 (diff)
downloadsamba-87fd2fd1574d4cb52aef216e632e9899a01b2940.tar.gz
samba-87fd2fd1574d4cb52aef216e632e9899a01b2940.tar.bz2
samba-87fd2fd1574d4cb52aef216e632e9899a01b2940.zip
Addition of userPrincipalName attribute when new account is created
Diffstat (limited to 'source4/scripting/python')
-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: