Changing/Setting Passwords in Active Directory

I’ve been doing some searching but am not faring so well.

Does anyone know a clean and reliable way to change and or set passwords
for
Windows accounts residing in Active Directory?

I’d rather not have to generate a VB script to be run for every user
account
created.

Thanks,
Glen


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

On 8/27/07, Glen H. [email protected] wrote:

Thanks,
Glen


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

I think I’m close but something is not working somewhere. This seems to
be
the most promising approach but doesn’t work:

require ‘win32ole’
require ‘Win32API’

adsi = WIN32OLE.connect(“LDAP://cn=#{username},PATH_TO_CONTAINER”)

adsi.put(“SetPassword”, “#{password}”)
this returns nil

adsi.invoke(“SetPassword”, “#{password}”)
this returns the string given as the password but nothing is changed

The following VB script works just fine:

Set objUser = GetObject _
(“LDAP://my values here”)
objUser.SetPassword “some password”


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Never mind, figured it out.

I needed to do:

adsi.SetPassword(“password”)

On 8/27/07, Glen H. [email protected] wrote:

account
-Greg Graffin (Bad Religion)

objUser.SetPassword “some password”


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)