r23716: Clarify LDAP Manager DN and fix slapd startup syntax.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 5 Jul 2007 01:45:37 +0000 (01:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:59:06 +0000 (14:59 -0500)
Andrew Bartlett
(This used to be commit 17dad5d8c345c2c3a7643bff7a43473339a22d40)

source4/scripting/libjs/provision.js
source4/setup/fedorads.inf
source4/setup/provision-backend
source4/setup/slapd.conf

index 2ef0747f0d2479913843f33a201980b3c9ab4337..4317a37a54e08c6cd58ee2b8a96a6e5066a9d96e 100644 (file)
@@ -464,6 +464,8 @@ function provision_fix_subobj(subobj, paths)
        var ldap_path_list = split("/", paths.ldapdir);
        subobj.LDAPI_URI = "ldapi://" + join("%2F", ldap_path_list) + "%2Fldapi";
 
+       subobj.LDAP_MANAGERDN = "cn=Manager," + subobj.DOMAINDN;
+
        return true;
 }
 
@@ -852,7 +854,7 @@ function provision_guess()
        subobj.KRBTGTPASS   = randpass(12);
        subobj.MACHINEPASS  = randpass(12);
        subobj.ADMINPASS    = randpass(12);
-       subobj.LDAPMANAGERPASS     = randpass(12);
+       subobj.LDAP_MANAGERPASS     = randpass(12);
        subobj.DEFAULTSITE  = "Default-First-Site-Name";
        subobj.NEWGUID      = randguid;
        subobj.NTTIME       = nttime;
index 785e65ce566d5e41c2b4128258ef23d87cbae1ae..43d02da20625d90fdd7b83f770ca67fa6639322e 100644 (file)
@@ -6,8 +6,8 @@ ServerRoot=   ${LDAPDIR}
 [slapd]
 ldapifilepath=${LDAPDIR}/ldapi
 Suffix= ${DOMAINDN}
-RootDN= cn=Manager,${DOMAINDN}
-RootDNPwd= ${LDAPMANAGERPASS}
+RootDN= ${LDAP_MANAGERDN}
+RootDNPwd= ${LDAP_MANAGERPASS}
 ServerIdentifier= samba4
 ${SERVERPORT}
 
index b36eed5343f2e96260ae6aeaa411b799d3d3c71b..5a3018b724dc988bfc3ee89f15a230fc902edfd6 100755 (executable)
@@ -90,7 +90,7 @@ for (r in options) {
 var paths = provision_default_paths(subobj);
 provision_fix_subobj(subobj, paths);
 message("Provisioning LDAP backend for %s in realm %s into %s\n", subobj.HOSTNAME, subobj.REALM, subobj.LDAPDIR);
-message("Using LDAP Manager password: %s\n", subobj.LDAPMANAGERPASS);
+message("Using %s password: %s\n", subobj.LDAP_MANAGERDN, subobj.LDAP_MANAGERPASS);
 var tmp_schema_ldb = subobj.LDAPDIR + "/schema-tmp.ldb";
 sys.mkdir(subobj.LDAPDIR, 0700);
 
@@ -137,7 +137,7 @@ if (options["ldap-backend-type"] == "fedora-ds") {
        setup_file("DB_CONFIG", message, subobj.LDAPDBDIR + "/DB_CONFIG", subobj);
        if (options["ldap-backend-port"] != undefined) {
                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;
+               slapd_command = "slapd -f " + subobj.LDAPDIR + "/slapd.conf -h \"ldap://0.0.0.0:" + options["ldap-backend-port"] + " " + subobj.LDAPI_URI "\"";
        } else {
                slapd_command = "slapd -f " + subobj.LDAPDIR + "/slapd.conf -h " + subobj.LDAPI_URI;
        }
index 770c688f35875f0da2a8209b85f77eda9cd71b47..b39e3d5cfbcdaa06c10fde8c022af6609cd364f8 100644 (file)
@@ -47,8 +47,8 @@ index nETBIOSName eq pres
 
 database        bdb
 suffix         ${DOMAINDN}
-rootdn          cn=Manager,${DOMAINDN}
-rootpw          ${LDAPMANAGERPASS}
+rootdn          ${LDAP_MANAGERDN}
+rootpw          ${LDAP_MANAGERPASS}
 directory      ${LDAPDIR}/db/user
 index           objectClass eq
 index           samAccountName eq