summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-07-09 00:09:49 +0400
committerStefan Metzmacher <metze@samba.org>2010-07-10 11:18:18 +0200
commitf16007430a683c0e43e1aca13f59c55dde70dfac (patch)
tree9f8c137cccb0875af4192c133f603db491f01766 /source4/scripting/python
parente962e7e9562f26b1ea6854b1a34f0237c3abf222 (diff)
downloadsamba-f16007430a683c0e43e1aca13f59c55dde70dfac.tar.gz
samba-f16007430a683c0e43e1aca13f59c55dde70dfac.tar.bz2
samba-f16007430a683c0e43e1aca13f59c55dde70dfac.zip
s4 provision: use correct GUID for default policies
The value of GUID for policy is not random for default policies, it is described here ("How Core Group Policy Works"): http://technet.microsoft.com/en-us/library/cc784268%28WS.10%29.aspx at paragraph System\Policies Container. Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/provision.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 131d4ffd6c..5ede869015 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -62,6 +62,8 @@ from samba.schema import Schema
from samba.samdb import SamDB
__docformat__ = "restructuredText"
+DEFAULT_POLICY_GUID = "31B2F340-016D-11D2-945F-00C04FB984F9"
+DEFAULT_DC_POLICY_GUID = "6AC1786C-016F-11D2-945F-00C04fB984F9"
def find_setup_dir():
"""Find the setup directory used by provision."""
@@ -1259,11 +1261,14 @@ def provision(setup_dir, logger, session_info,
domainsid = security.dom_sid(domainsid)
# create/adapt the group policy GUIDs
+ # Default GUID for default policy are described at
+ # "How Core Group Policy Works"
+ # http://technet.microsoft.com/en-us/library/cc784268%28WS.10%29.aspx
if policyguid is None:
- policyguid = str(uuid.uuid4())
+ policyguid = DEFAULT_POLICY_GUID
policyguid = policyguid.upper()
if policyguid_dc is None:
- policyguid_dc = str(uuid.uuid4())
+ policyguid_dc = DEFAULT_DC_POLICY_GUID
policyguid_dc = policyguid_dc.upper()
if adminpass is None: