From 87fd2fd1574d4cb52aef216e632e9899a01b2940 Mon Sep 17 00:00:00 2001 From: Lukasz Zalewski Date: Sat, 16 Oct 2010 19:51:09 +0100 Subject: Addition of userPrincipalName attribute when new account is created --- source4/scripting/python/samba/samdb.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/scripting') 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: -- cgit