summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-25 13:18:43 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-13 15:37:12 +1000
commit846e34264828e725ad32897aafbdfd6c0334a7a9 (patch)
treed0e2bde3a1a1cf9755e9393e3704ff64cda3e90c /source4/scripting
parent6635bb70d32d5214bc027428ac4a3737e8327c17 (diff)
downloadsamba-846e34264828e725ad32897aafbdfd6c0334a7a9.tar.gz
samba-846e34264828e725ad32897aafbdfd6c0334a7a9.tar.bz2
samba-846e34264828e725ad32897aafbdfd6c0334a7a9.zip
s4-provision Split addition of users and well known principals
If we are provisioning a subdomain, then these are already in cn=configuration. Andrew Bartlett
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 130ea72e70..761caa2dce 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1402,19 +1402,24 @@ def fill_samdb(samdb, lp, names,
# If we are setting up a subdomain, then this has been replicated in, so we don't need to add it
if fill == FILL_FULL:
setup_modify_ldif(samdb,
- setup_path("provision_basedn_references.ldif"),
- {"DOMAINDN": names.domaindn})
+ setup_path("provision_configuration_references.ldif"), {
+ "CONFIGDN": names.configdn,
+ "SCHEMADN": names.schemadn})
- setup_modify_ldif(samdb,
- setup_path("provision_configuration_references.ldif"), {
+ logger.info("Setting up well known security principals")
+ setup_add_ldif(samdb, setup_path("provision_well_known_sec_princ.ldif"), {
"CONFIGDN": names.configdn,
- "SCHEMADN": names.schemadn})
+ })
+
if fill == FILL_FULL or fill == FILL_SUBDOMAIN:
+ setup_modify_ldif(samdb,
+ setup_path("provision_basedn_references.ldif"),
+ {"DOMAINDN": names.domaindn})
+
logger.info("Setting up sam.ldb users and groups")
setup_add_ldif(samdb, setup_path("provision_users.ldif"), {
"DOMAINDN": names.domaindn,
"DOMAINSID": str(domainsid),
- "CONFIGDN": names.configdn,
"ADMINPASS_B64": b64encode(adminpass.encode('utf-16-le')),
"KRBTGTPASS_B64": b64encode(krbtgtpass.encode('utf-16-le'))
})