diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-07-05 00:34:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:59:06 -0500 |
commit | c37cfae81e6f87feecb0737cb7e646c9a7da1114 (patch) | |
tree | a9edbb13b207d31c500f93045c1917d22087ab2e /source4/setup | |
parent | 3a78f7323a986703c9b7100f551b1c907a9e104b (diff) | |
download | samba-c37cfae81e6f87feecb0737cb7e646c9a7da1114.tar.gz samba-c37cfae81e6f87feecb0737cb7e646c9a7da1114.tar.bz2 samba-c37cfae81e6f87feecb0737cb7e646c9a7da1114.zip |
r23715: Make the provision-backend script print out the exact commands to run,
to set up the LDAP backend.
Andrew Bartlett
(This used to be commit cc7900210a2e473060d5897ec729923ac6b2f18d)
Diffstat (limited to 'source4/setup')
-rwxr-xr-x | source4/setup/provision | 9 | ||||
-rwxr-xr-x | source4/setup/provision-backend | 13 |
2 files changed, 18 insertions, 4 deletions
diff --git a/source4/setup/provision b/source4/setup/provision index 8e67dd4b3c..175ed8f161 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -121,13 +121,19 @@ var ldapbase = (options["ldap-base"] != undefined); var ldapbackend = (options["ldap-backend"] != undefined); var ldapmodule = (options["ldap-module"] != undefined); var partitions_only = (options["partitions-only"] != undefined); +var paths = provision_default_paths(subobj); if (options["aci"] != undefined) { message("set ACI: %s\n", subobj["ACI"]); } message("set DOMAIN SID: %s\n", subobj["DOMAINSID"]); +provision_fix_subobj(subobj, paths); + if (ldapbackend) { + if (options["ldap-backend"] == "ldapi") { + subobj.LDAPBACKEND = subobj.LDAPI_URI; + } if (!ldapmodule) { subobj.LDAPMODULE = "entryUUID"; } @@ -137,7 +143,7 @@ if (ldapbackend) { subobj.CONFIGDN_MOD2 = "," + subobj.LDAPMODULE + ",paged_searches"; subobj.SCHEMADN_LDB = subobj.LDAPBACKEND; subobj.SCHEMADN_MOD2 = "," + subobj.LDAPMODULE + ",paged_searches"; - message("LDAP module: %s backend: %s\n", subobj.LDAPMODULE, subobj.LDAPBACKEND); + message("LDAP module: %s on backend: %s\n", subobj.LDAPMODULE, subobj.LDAPBACKEND); } if (!provision_validate(subobj, message)) { @@ -146,7 +152,6 @@ if (!provision_validate(subobj, message)) { var system_session = system_session(); var creds = options.get_credentials(); -var paths = provision_default_paths(subobj); message("Provisioning for %s in realm %s\n", subobj.DOMAIN, subobj.REALM); message("Using administrator password: %s\n", subobj.ADMINPASS); if (ldapbase) { diff --git a/source4/setup/provision-backend b/source4/setup/provision-backend index 2fa0cc0ecc..b36eed5343 100755 --- a/source4/setup/provision-backend +++ b/source4/setup/provision-backend @@ -98,6 +98,7 @@ provision_schema(subobj, message, tmp_schema_ldb, paths); var mapping; var ext; +var slapd_command; if (options["ldap-backend-type"] == "fedora-ds") { mapping = "schema-map-fedora-ds-1.0"; ext = "ldif"; @@ -110,6 +111,8 @@ if (options["ldap-backend-type"] == "fedora-ds") { } setup_file("fedorads.inf", message, subobj.LDAPDIR + "/fedorads.inf", subobj); setup_file("fedorads-partitions.ldif", message, subobj.LDAPDIR + "/fedorads-partitions.ldif", subobj); + + slapd_command = "(see documentation)"; } else if (options["ldap-backend-type"] == "openldap") { provision_ldapbase(subobj, message, paths); mapping = "schema-map-openldap-2.3"; @@ -133,10 +136,16 @@ if (options["ldap-backend-type"] == "fedora-ds") { sys.mkdir(subobj.LDAPDBDIR + "/bdb-logs", 0700); setup_file("DB_CONFIG", message, subobj.LDAPDBDIR + "/DB_CONFIG", subobj); if (options["ldap-backend-port"] != undefined) { - message("NOTE: OpenLDAP TCP ports are controlled on the command line, not in the generated config file\n"); + message("\nStart slapd with: \n"); + slapd_command = "slapd -f " + subobj.LDAPDIR + "/slapd.conf -h ldap://0.0.0.0:" + options["ldap-backend-port"] + " -h " + subobj.LDAPI_URI; + } else { + slapd_command = "slapd -f " + subobj.LDAPDIR + "/slapd.conf -h " + subobj.LDAPI_URI; } } -message("ad2oLschema --option=convert:target=" + options["ldap-backend-type"] + " -I " + lp.get("setup directory") + "/" + mapping + " -H tdb://" + tmp_schema_ldb + " -O " + subobj.LDAPDIR + "/backend-schema." + ext + "\n"); +var schema_command = "ad2oLschema --option=convert:target=" + options["ldap-backend-type"] + " -I " + lp.get("setup directory") + "/" + mapping + " -H tdb://" + tmp_schema_ldb + " -O " + subobj.LDAPDIR + "/backend-schema." + ext; + +message("\nCreate a suitable schema file with:\n%s\n", schema_command); +message("\nStart slapd with: \n%s\n", slapd_command); message("All OK\n"); return 0; |