By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

Problem creating AD user when Minimum password length is enabled

P: n/a

Howdy- I have some code that programmatically creates users in AD like

user.Properties["userAccountControl"].Value = 512;

// Set password
user.Invoke("SetPassword", new object[] { password });

(the basic user information/properties has already been set in other

This works fine in my dev environment. However, in production my client
has set the Minimum password length in AD to 6 characters, and this
stops the user from getting registered (The resulting error is: “A
system error occurred (-2147016651, The server is unwilling to process
the request”). It seems like AD won’t let you create a user sans
password with this security setting enabled... which makes sense.

Any thoughts? Is there a way to create a user and the password at the
same time? One workaround I had that came close was to set the
userAccountControl to 32 (password not required) which does allow me to
create a user, but the account is then set to “user must change password
at next logon” and the user.Invoke(“SetPassword’ line then blows up.

Any help of insight would be appreciated.


*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.