diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-09-16 17:31:56 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-24 09:25:42 +1000 |
commit | 65ca9e691bb12d37de39e382c897d7b41d846c26 (patch) | |
tree | 07804e558ece7d8a0d9fb719b7bf4f563e122e90 /source4/scripting | |
parent | 439d7ff935f845ae381e8650e7e2b80d65e929d2 (diff) | |
download | samba-65ca9e691bb12d37de39e382c897d7b41d846c26.tar.gz samba-65ca9e691bb12d37de39e382c897d7b41d846c26.tar.bz2 samba-65ca9e691bb12d37de39e382c897d7b41d846c26.zip |
s4:provision.py - support still not fully provisioned trees regarding the rootDSE module
We simply override the NTDS settings path manually
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 6c2d0f1115..28135063d7 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -1043,6 +1043,10 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names, # Load the schema from the one we computed earlier samdb.set_schema(schema) + # Set the NTDS settings DN manually - in order to have it already around + # before the provisioned tree exists and we connect + samdb.set_ntds_settings_dn("CN=NTDS Settings,%s" % names.serverdn) + # And now we can connect to the DB - the schema won't be loaded from the DB samdb.connect(path) @@ -1063,7 +1067,6 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names, samdb.set_domain_sid(str(domainsid)) samdb.set_invocation_id(invocationid) - samdb.set_ntds_settings_dn("CN=NTDS Settings,%s" % names.serverdn) logger.info("Adding DomainDN: %s" % names.domaindn) @@ -1121,10 +1124,16 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names, else: samdb.transaction_commit() - samdb = SamDB(session_info=admin_session_info, + samdb = SamDB(session_info=admin_session_info, auto_connect=False, credentials=provision_backend.credentials, lp=lp, global_schema=False, am_rodc=am_rodc) + + # Set the NTDS settings DN manually - in order to have it already around + # before the provisioned tree exists and we connect + samdb.set_ntds_settings_dn("CN=NTDS Settings,%s" % names.serverdn) + samdb.connect(path) + samdb.transaction_start() try: samdb.invocation_id = invocationid |