Home All Groups Group Topic Archive Search About

Set password length for windows system programmaticaly

Author
25 Mar 2009 8:08 AM
pradyumna.litu
Hi,
  I've tested out through a TEST.exe the method "NetUserChangePassword
()" and it is taking '63' as the maximum password length for both
Standalone & Domain connected systems. If the password is more than 63
then we get error as ----
   "Unable to update the password.The value provided for the new
password does meet the length,complexity or history requirement of the
domain (1325)"

  Can we set more than '63' as password length for Windows server as
well as Standalone machines through any API programaticaly ??

please let me know as soon as possible.
Thank you in advance.

Bye...

Author
25 Mar 2009 12:52 PM
Meinolf Weber [MVP-DS]
Hello pradyumna.l***@gmail.com,

256 is the maximum according to this:

The graphical logon interface dialog box only supports passwords up to 127
characters. However, internally Windows 2000 and higher allow passwords to
be up to 256 characters long. For accounts that only need to be used programmatically,
such as most service accounts, we can actually take advantage of this to
set a password that cannot be used interactively.

If the password will not ever need to be typed by a human being there is
no real reason not to set it to be as long as is allowed. Note that you cannot
configure a password that is longer than 127 characters in the GUI. To do
so you need a tool that calls the NetUserChangePassword or NetUserSetInfo
APIs directly. The length limitation is only in the GUI, not in the APIs.

From:  http://technet.microsoft.com/en-us/library/cc512606.aspx

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm


Show quoteHide quote
> Hi,
> I've tested out through a TEST.exe the method "NetUserChangePassword
> ()" and it is taking '63' as the maximum password length for both
> Standalone & Domain connected systems. If the password is more than 63
> then we get error as ----
> "Unable to update the password.The value provided for the new
> password does meet the length,complexity or history requirement of the
> domain (1325)"
>
> Can we set more than '63' as password length for Windows server as
> well as Standalone machines through any API programaticaly ??
>
> please let me know as soon as possible.
> Thank you in advance.
> Bye...
>