diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-02 12:06:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:36:24 -0500 |
commit | aae4b1a95193796ef0368cd3f2b65d59f9805b7f (patch) | |
tree | 16cd83ff3cc7879c200bbacd40b3d5bd1f54d71b | |
parent | fc411bed80e3150a0d368daf9fb41f6c2aedf537 (diff) | |
download | samba-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)
-rw-r--r-- | source4/scripting/libjs/upgrade.js | 19 | ||||
-rw-r--r-- | source4/setup/hklm.ldif | 22 |
2 files changed, 28 insertions, 13 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); diff --git a/source4/setup/hklm.ldif b/source4/setup/hklm.ldif index c9e64002d1..419a4c504a 100644 --- a/source4/setup/hklm.ldif +++ b/source4/setup/hklm.ldif @@ -8,9 +8,6 @@ value: CASE_INSENSITIVE dn: key=control,key=currentcontrolset,key=system,hive=NONE key: control -dn: key=services,key=control,key=currentcontrolset,key=system,hive=NONE -key: services - dn: value=ProductType,key=productoptions,key=control,key=currentcontrolset,key=system,hive=NONE value: ProductType data: LanmanNT @@ -22,12 +19,6 @@ key: productoptions dn: key=system,hive=NONE key: system -dn: key=netlogon,key=services,key=currentcontrolset,key=system,hive=NONE -key: netlogon - -dn: key=services,key=currentcontrolset,key=system,hive=NONE -key: services - dn: key=print,key=control,key=currentcontrolset,key=system,hive=NONE key: print @@ -37,3 +28,16 @@ key: currentcontrolset dn: key=Terminal Server,key=control,key=currentcontrolset,key=system,hive=NONE key: Terminal Server +dn: key=Services,key=CurrentControlSet,key=System,hive=NONE +key: Services + +dn: key=Netlogon,key=Services,key=CurrentControlSet,key=System,hive=NONE +key: Netlogon + +dn: key=Parameters,key=Netlogon,key=Services,key=CurrentControlSet,key=System,hive=NONE +key: Parameters + +dn: value=RefusePasswordChange,key=Parameters,key=Netlogon,key=Services,key=CurrentControlSet,key=System,hive=NONE +value: RefusePasswordChange +type: 4 +data: 0 |