WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

dsSetPassword and Blank Passwords


Question:

Some quirky behaviour from dsSetPassword. Whenever I try to pass a blank password ( "" ) to it I get a WIL Extender Error 203: Third parameter must have a value. Works fine if password is not blank. There is no GPO for minimum password length. If I use the MMC console to manually reset it works fine. I am running this function from a Windows 98 workstation. Any ideas ???

Answer:

You can not use dsSetPassword to set a blank password. This behavior is by design.

If you really thing you need to set a password to blank you can use the ADSI COM user interface to set it.

dso = GetObject("LDAP:")

; Get the ADSI user object with admin authority.
usr = dso.OpenDSObject("LDAP://shamrock/CN=homer simpson,cn=users,DC=jclass, dc=org", "jclass\administrator", "********", 1)
usr.SetPassword("")

usr = 0
dso = 0
or if your default credentials have sufficient privileges you can use:
usr = GetObject("LDAP://shamrock/CN=homer simpson,cn=users,DC=jclass, dc=org")
You can intermix extender and ADSI COM interface calls in the same script.
Article ID:   W16309
File Created: 2005:02:18:12:19:44
Last Updated: 2005:02:18:12:19:44