summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2010-05-10 13:52:27 +0300
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2010-05-10 17:24:02 +0300
commitc3cbb846d0bfbaa11fd255bada7fa5fe502d4d96 (patch)
treecd051fb134290c4553a5949e25907aba8759885d /source4/scripting
parent83736066a3f94eaadb422016c9f22cb18bec2cd7 (diff)
downloadsamba-c3cbb846d0bfbaa11fd255bada7fa5fe502d4d96.tar.gz
samba-c3cbb846d0bfbaa11fd255bada7fa5fe502d4d96.tar.bz2
samba-c3cbb846d0bfbaa11fd255bada7fa5fe502d4d96.zip
s4-rodc: Fix provision warnings by creating ntds objectGUID in provision
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision.py6
-rw-r--r--source4/scripting/python/samba/samdb.py4
2 files changed, 9 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index fa2dabe5d4..b9b59b4218 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -840,7 +840,7 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp,
names, message,
domainsid, domainguid, policyguid, policyguid_dc,
fill, adminpass, krbtgtpass,
- machinepass, invocationid, dnspass, ntdsguid,
+ machinepass, invocationid, ntds_guid, dnspass, ntdsguid,
serverrole, dom_for_fun_level=None,
schema=None):
"""Setup a complete SAM Database.
@@ -901,6 +901,7 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp,
samdb.set_domain_sid(str(domainsid))
samdb.set_invocation_id(invocationid)
+ samdb.set_ntds_GUID(ntds_guid)
samdb.set_ntds_settings_dn("CN=NTDS Settings,%s" % names.serverdn)
message("Adding DomainDN: %s" % names.domaindn)
@@ -1228,6 +1229,8 @@ def provision(setup_dir, message, session_info,
if invocationid is None:
invocationid = str(uuid.uuid4())
+ ntds_guid = str(uuid.uuid4())
+
if not os.path.exists(paths.private_dir):
os.mkdir(paths.private_dir)
if not os.path.exists(os.path.join(paths.private_dir,"tls")):
@@ -1321,6 +1324,7 @@ def provision(setup_dir, message, session_info,
fill=samdb_fill,
adminpass=adminpass, krbtgtpass=krbtgtpass,
invocationid=invocationid,
+ ntds_guid=ntds_guid,
machinepass=machinepass, dnspass=dnspass,
ntdsguid=ntdsguid, serverrole=serverrole,
dom_for_fun_level=dom_for_fun_level)
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index 991c678c7c..d7b7d82604 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -262,6 +262,10 @@ accountExpires: %u
"Get the NTDS objectGUID"
return dsdb.samdb_ntds_objectGUID(self)
+ def set_ntds_GUID(self, object_guid):
+ "Set the NTDS objectGUID"
+ return dsdb.dsdb_set_ntds_objectGUID(self, object_guid)
+
def server_site_name(self):
"Get the server site name"
return dsdb.samdb_server_site_name(self)