% page_header("columns", "Provisioning", "install");
include("/scripting/forms.js");
libinclude("base.js");
libinclude("provision.js");
%>
Samba4 provisioning
<%
var f = FormObj("Provisioning", 0, 2);
var i;
var lp = loadparm_init();
if (lp.get("realm") == "") {
lp.set("realm", lp.get("workgroup") + ".example.com");
}
var subobj = provision_guess();
/* Don't supply default password for web interface */
subobj.ADMINPASS = "";
f.add("REALM", "Realm");
f.add("DOMAIN", "Domain Name");
f.add("HOSTNAME", "Hostname");
f.add("ADMINPASS", "Administrator Password", "password");
f.add("CONFIRM", "Confirm Password", "password");
f.add("DOMAINSID", "Domain SID");
f.add("HOSTGUID", "Host GUID");
f.add("BASEDN", "Base DN");
f.add("HOSTIP", "Host IP");
f.add("DEFAULTSITE", "Default Site");
f.submit[0] = "Provision";
f.submit[1] = "Cancel";
if (form['submit'] == "Cancel") {
redirect("/");
}
if (form['submit'] == "Provision") {
for (r in form) {
subobj[r] = form[r];
}
}
for (i=0;iPasswords don't match. Please try again.");
f.display();
} else if (subobj.ADMINPASS == "") {
write("You must choose an administrator password. Please try again.
");
f.display();
} else if (!provision_validate(subobj, writefln)) {
f.display();
} else {
provision(subobj, writefln, false, provision_default_paths(subobj));
}
} else {
f.display();
}
%>
<% page_footer(); %>