In short, this attribute can be only set as 0 to unlock.
Active Directory - not able to update lockouttime attribute.
While Updating lockouttime attribute(as a large integer) for an user in active directory, getting below error.
Operation failed. Error code : 0x57
The parameter is incorrect
00000057: SysErr: DSID-031A12C8, problem 22(Invalid argument), data 0.
any help is appreciated.
Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | Other
4 answers
Sort by: Most helpful
-
-
ReddyKiran AV 1 Reputation point
2022-12-15T07:10:58.967+00:00 Thanks @Aung Zaw Min Thwin for your answer.
https://learn.microsoft.com/en-us/windows/win32/adschema/a-lockouttime
Above documentation says it has a update privilege with domain administrator. if it can be updated to only to 0, then is there any other attribute which i can use to lock an account manually. -
Limitless Technology 44,766 Reputation points
2022-12-15T13:27:34.383+00:00 Hello there,
You can't set this attribute to an arbitrary value in AD. This is a
Microsoft imposed limitation.To unlock the account, set this attribute to "0"
To lock the account simulate bad logins until you have reached the defined account lockout threshold
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--
-
Gary Reynolds 9,621 Reputation points
2022-12-21T00:43:18.537+00:00 Hi,
As mentioned above it's not possible to set the lockout time attribute to a specific value, by setting the value to 0 (zero) the time is cleared. Another option to try, which is available on other system based attributes, by setting the value to -1, it will set the current time and date. I don't have a system to test it but it's worth a try.
Gary.