summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/libjs/provision.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index f5aaeafe89..894b42ceb7 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -10,6 +10,27 @@ provision_next_usn = 1;
sys = sys_init();
/*
+ return true if the current install seems to be OK
+*/
+function install_ok()
+{
+ var lp = loadparm_init();
+ var ldb = ldb_init();
+ if (lp.get("realm") == "") {
+ return false;
+ }
+ var ok = ldb.connect(lp.get("sam database"));
+ if (!ok) {
+ return false;
+ }
+ var res = ldb.search("(name=Administrator)");
+ if (res.length != 1) {
+ return false;
+ }
+ return true;
+}
+
+/*
find a user or group from a list of possibilities
*/
function findnss()