WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

wntAcctPolSet Error


Question:

When trying to use wntAcctPolSet("",6,'0') to set the account lockout duration to "0" (0 = Account is locked out until administrator unlocks it), I get a Wil Extender Error: 697, Error Setting Account Policy Information. Using a value of 1-9999 work with no issues. Does anyone know how I would set the account lockout duration to 0?

The wwwbatch.ini contains the following:

[WWWNT34I]
LastError=87 (NetUserModalsSet)

Answer:

For request #'s 6, 7 & 8, what does wntAcctPolGet() return *before* you attempt to call wntAcctPolSet() for request #6?

Assuming that wntAcctPolSet() doesn't fail, what would your desired values [as above] be after all calls to wntAcctPolSet() have been made?

I think there's some sort of interdependency between those 3 values, and in certain situations, modifying only 1 of them at a time results in the underlying NetUserModalsSet() function failing as you're observing. It may be necessary to have the wntAcctPolSet() function test for these special cases and have it modify multiple values at the same time in order to satisfy the dependency requirements. If I know what you've got and where you're trying to get, I can better understand if you're doing something that violates the dependency requirements.

I am not sure 0 is a valid value accepted by wntAcctPolSet for 'Account lockout duration' (6) if the 'Account lockout treshold' (7) is equal to 0. In otherwords, the settings "Account lockout duration" are only relevant if the "Account lockout treshold" ist set to any value greather than zero.

NOTE: Carefully consider setting the LockoutDuration value to 0. When you apply this setting, you may incur additional administrative labor by requiring administrators to manually unlock a locked out user account. Although this does increase security, the increased labor drawback may outweigh the security benefit.


Article ID:   W17072
File Created: 2007:07:03:14:28:04
Last Updated: 2007:07:03:14:28:04