mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r9951: Add another value to the default HKLM.
Convert Samba3 policy "refuse machine pw change" to registry value.
(This used to be commit a143234ac7
)
This commit is contained in:
parent
fc411bed80
commit
aae4b1a951
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user