summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-09 14:57:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-04-09 14:57:57 +1000
commit9d2948f4bd5f196904d27c67bf4f0baf7eaefcb0 (patch)
treef40a84852989a367c348719c8d0862198e175c32
parent29b25a1b043b1564a25765d553f3950cd5edb782 (diff)
downloadsamba-9d2948f4bd5f196904d27c67bf4f0baf7eaefcb0.tar.gz
samba-9d2948f4bd5f196904d27c67bf4f0baf7eaefcb0.tar.bz2
samba-9d2948f4bd5f196904d27c67bf4f0baf7eaefcb0.zip
Don't fill in the secrets DB unless we make the entries.
Leave filling in (we still initialise it) the secrets DB for the join or vampire code. Andrew Bartlett (This used to be commit c93208c13ce91b334eadf0ea02fa41354e761e97)
-rw-r--r--source4/scripting/python/samba/provision.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index c9cdcdb768..7b4fdb772c 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1011,13 +1011,6 @@ def provision(setup_dir, message, session_info,
os.makedirs(os.path.join(policy_path, "User"), 0755)
if not os.path.isdir(paths.netlogon):
os.makedirs(paths.netlogon, 0755)
- secrets_ldb = Ldb(paths.secrets, session_info=session_info,
- credentials=credentials, lp=lp)
- secretsdb_become_dc(secrets_ldb, setup_path, domain=domain, realm=names.realm,
- netbiosname=names.netbiosname, domainsid=domainsid,
- keytab_path=paths.keytab, samdb_url=paths.samdb,
- dns_keytab_path=paths.dns_keytab, dnspass=dnspass,
- machinepass=machinepass, dnsdomain=names.dnsdomain)
if samdb_fill == FILL_FULL:
setup_name_mappings(samdb, idmap, str(domainsid), names.domaindn,
@@ -1029,6 +1022,14 @@ def provision(setup_dir, message, session_info,
# Only make a zone file on the first DC, it should be replicated with DNS replication
if serverrole == "domain controller":
+ secrets_ldb = Ldb(paths.secrets, session_info=session_info,
+ credentials=credentials, lp=lp)
+ secretsdb_become_dc(secrets_ldb, setup_path, domain=domain, realm=names.realm,
+ netbiosname=names.netbiosname, domainsid=domainsid,
+ keytab_path=paths.keytab, samdb_url=paths.samdb,
+ dns_keytab_path=paths.dns_keytab, dnspass=dnspass,
+ machinepass=machinepass, dnsdomain=names.dnsdomain)
+
samdb = SamDB(paths.samdb, session_info=session_info,
credentials=credentials, lp=lp)