Brian Delaney said:
Hi Chris,
The only way to do this is to actually enter the incorrect password more
times then you configured account lockout threshold. A simple way to do
this via the command line is with something like this run multiple times:
net use * \\server\c$ /user:domain\user badpassword
The account may be automatically unlocked if you have configured that
option in your lockout policy for the domain. The default would be to
automatically unlock the account after 30 minutes.
Actually I believe the question 'should' have been how to
DISABLE the account. Lockout is an automatic setting but
disabling the account is something the admin does (unless the
admin is testing lockout behavior and then the idea of purposely
using the wrong password makes sense.)
dsmod USER -disabled YES | NO
If one were really testing the lockout of an account, then using
a "for ... in ... do" loop might make sense:
for /l %a in (1,1,5) do net use * \\server\c$ /user:domain\user
badpassword
Perhaps putting in a delay to check the time involved (i.e., & sleep 300).
Sleep is in the Reskit tools or the Win32 "unx" tools on the
Internet.