talee
asked on
Which value is for the Account Policy in the registry ?
I'm using Windows NT 4.0 and I need to use API to modify the Account Policy of default option " No Account Lockout" to Account Lockout ".
My question is which registry value is releated to the Account Policy and how can I identify the data that represent the "No Account Lockout" AND" Account Lockout" option.
Ps
To go to Account Policy :
Go to Administrative Tool -> User Manger( On the menu bar select Policies followed by Account )
My question is which registry value is releated to the Account Policy and how can I identify the data that represent the "No Account Lockout" AND" Account Lockout" option.
Ps
To go to Account Policy :
Go to Administrative Tool -> User Manger( On the menu bar select Policies followed by Account )
ASKER
Sorry, this is not what I want. What I want is to set the "No Account Lockout" option to "Account LockOut" and the " Lockout duration" is set to forever until administrator unlocks the account.The structure USER_MODALS_INFO_3 doesn't allow me to set the Lockout duration to what I want.So I need to know the value for the ACCOUNT POLICY in the registry.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, I still not very clear and can't get my program to run.Can you please be more specific and show me an example on how to use the structure.
Thank You.
Thank You.
Here is an example. First the current values are read out, then the new values are set. This turned out to be lots of work for not many points.
USER_MODALS_INFO_3 *umi3;
DWORD status;
status=NetUserModalsGet(L" \\\\ANDREA S",3,(LPBY TE*)&umi3) ;
if(!status) {
wprintf(L"%d %d %d\n",umi3->usrmod3_lockou t_duration ,
umi3->usrmod3_lockout_obse rvation_wi ndow,
umi3->usrmod3_lockout_thre shold);
NetApiBufferFree((LPBYTE)u mi3);
} else
wprintf(L"Error: %d",status);
DWORD parmerr;
DWORD status2;
USER_MODALS_INFO_3 umi3b;
umi3b.usrmod3_lockout_dura tion=TIMEQ _FOREVER;
umi3b.usrmod3_lockout_obse rvation_wi ndow=300;
umi3b.usrmod3_lockout_thre shold=5;
status2=NetUserModalsSet(L "\\\\ANDRE AS",3,(LPB YTE)&umi3b ,&parmerr) ;
if(status2)
wprintf(L"Error: %d",status2);
USER_MODALS_INFO_3 *umi3;
DWORD status;
status=NetUserModalsGet(L"
if(!status) {
wprintf(L"%d %d %d\n",umi3->usrmod3_lockou
umi3->usrmod3_lockout_obse
umi3->usrmod3_lockout_thre
NetApiBufferFree((LPBYTE)u
} else
wprintf(L"Error: %d",status);
DWORD parmerr;
DWORD status2;
USER_MODALS_INFO_3 umi3b;
umi3b.usrmod3_lockout_dura
umi3b.usrmod3_lockout_obse
umi3b.usrmod3_lockout_thre
status2=NetUserModalsSet(L
if(status2)
wprintf(L"Error: %d",status2);
and check out the structure USER_MODALS_INFO_3