summaryrefslogtreecommitdiff
path: root/source4/setup/provision
diff options
context:
space:
mode:
Diffstat (limited to 'source4/setup/provision')
-rwxr-xr-xsource4/setup/provision15
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index d6497cf180..a58f4a5dce 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -28,7 +28,9 @@ options = GetOptions(ARGV,
'wheel=s',
'users=s',
'quiet',
- 'blank');
+ 'blank',
+ 'ldap-base',
+ 'ldap-backend=s');
if (options == undefined) {
println("Failed to parse options");
@@ -75,6 +77,8 @@ provision [options]
--users GROUPNAME choose 'users' group
--quiet Be quiet
--blank do not add users or groups, just the structure
+ --ldap-base output only an LDIF file, suitable for creating an LDAP baseDN
+ --ldap-backend LDAPSERVER LDAP server to use for this provision
You must provide at least a realm and domain
@@ -108,6 +112,7 @@ for (r in options) {
}
var blank = (options["blank"] != undefined);
+var ldapbase = (options["ldap-base"] != undefined);
if (!provision_validate(subobj, message)) {
return -1;
@@ -118,7 +123,11 @@ 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);
-provision(subobj, message, blank, paths, system_session, creds);
-provision_dns(subobj, message, paths, system_session, creds);
+if (ldapbase) {
+ provision_ldapbase(subobj, message, paths);
+} else {
+ provision(subobj, message, blank, paths, system_session, creds);
+ provision_dns(subobj, message, paths, system_session, creds);
+}
message("All OK\n");
return 0;