summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-02 12:06:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:24 -0500
commitaae4b1a95193796ef0368cd3f2b65d59f9805b7f (patch)
tree16cd83ff3cc7879c200bbacd40b3d5bd1f54d71b /source4/scripting/libjs
parentfc411bed80e3150a0d368daf9fb41f6c2aedf537 (diff)
downloadsamba-aae4b1a95193796ef0368cd3f2b65d59f9805b7f.tar.gz
samba-aae4b1a95193796ef0368cd3f2b65d59f9805b7f.tar.bz2
samba-aae4b1a95193796ef0368cd3f2b65d59f9805b7f.zip
r9951: Add another value to the default HKLM.
Convert Samba3 policy "refuse machine pw change" to registry value. (This used to be commit a143234ac7622ef3ef87c80224927551a1452e4b)
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r--source4/scripting/libjs/upgrade.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/source4/scripting/libjs/upgrade.js b/source4/scripting/libjs/upgrade.js
index e11af26aa7..62556ed8d9 100644
--- a/source4/scripting/libjs/upgrade.js
+++ b/source4/scripting/libjs/upgrade.js
@@ -85,14 +85,12 @@ samba3ResetCountMinutes: %d
samba3UserMustLogonToChangePassword: %d
samba3BadLockoutMinutes: %d
samba3DisconnectTime: %d
-samba3RefuseMachinePwdChange: %d
", dn, samba3.policy.min_password_length,
samba3.policy.password_history, samba3.policy.minimum_password_age,
samba3.policy.maximum_password_age, samba3.policy.lockout_duration,
samba3.policy.reset_count_minutes, samba3.policy.user_must_logon_to_change_password,
- samba3.policy.bad_lockout_minutes, samba3.policy.disconnect_time,
- samba3.policy.refuse_machine_password_change
+ samba3.policy.bad_lockout_minutes, samba3.policy.disconnect_time
);
return ldif;
@@ -466,6 +464,18 @@ function upgrade(subobj, samba3, message, paths)
ok = samdb.modify(ldif);
assert(ok);
+ var regdb = ldb_init();
+ ok = regdb.connect(paths.hklm);
+ assert(ok);
+ ok = regdb.modify(sprintf("
+dn: value=RefusePasswordChange,key=Parameters,key=Netlogon,key=Services,key=CurrentControlSet,key=System,HIVE=NONE
+replace: type
+type: 4
+replace: data
+data: %d
+", samba3.policy.refuse_machine_password_change));
+ assert(ok);
+
message("Importing users\n");
for (var i in samba3.samaccounts) {
var msg = "... " + samba3.samaccounts[i].username;
@@ -497,7 +507,7 @@ function upgrade(subobj, samba3, message, paths)
for (var i in hives) {
var hn = hives[i];
message("... " + hn + "\n");
- var regdb = ldb_init();
+ regdb = ldb_init();
ok = regdb.connect(paths[hn]);
assert(ok);
var ldif = upgrade_registry(samba3.registry, hn, regdb);
@@ -512,6 +522,7 @@ function upgrade(subobj, samba3, message, paths)
}
}
+
message("Importing WINS data\n");
var winsdb = ldb_init();
ok = winsdb.connect(paths.winsdb);