wntAcctPolSet

Sets account policy information for a server.

Syntax:

wntAcctPolSet( server-name, request, value)

Parameters:

(s) server-name: the UNC name of the server on which the function will execute (eg, "\\MYSERVER"), or a blank string ("") to indicate the current machine.

(i) request: specifies the information to be set (see below).

(i) value: the new value to be set for "request".

Returns:

(i) 1, always.

 

"request" specifies the information to be set, and can be one of the following:

Request

Returns

1

Minimum allowable password length.

2

Maximum allowable password age, in days, or -1 if passwords never expire.

3

Minimum elapsed time, in days, between when the password was last changed and when it can be changed again. A value of 0 indicates that no delay is required between password updates.

4

Amount of time, in seconds, between the end of the valid logon time and the time when the user is forced to log off the network, or -1 if users are never forced to log off. A value of 0 indicates that users will be forced to log off immediately when the valid logon time expires.

5

Length of password history maintained (ie, the number of previous passwords stored in the password history buffer). A new password cannot match any of the passwords in the buffer.

6

Lockout duration, in minutes (ie, the amount of time that a locked account will remain locked before being automatically unlocked).

7

Maximum time, in minutes, between any two failed logon attempts for lockout to occur.

8

Number of invalid password authentications for which an account is to be marked as locked out.

 

Note: This function can only be performed by members of the Administrators or Account Operators local group.

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

info=wntAcctPolSet("\\Server\L4", 8, 3) Message("Set Number of invalid password authentications allowed","Number of password authentications is set to 3") Exit
See Also:

wntAcctPolGet, wntAcctInfo