diff options
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 17 |
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')) }) |