This is not a blog

November 7, 2006

ruby heart ADSI

Filed under: Active Directory, Ruby, Windows — aberant @ 12:11 pm

so i was trying to find an example of how to use win32ole in ruby that does’t involve excel and stumbled across this interesting post about ADSI. so now armed with this and the reference at MSDN, i now have the shoulder mounted missile launcher i need to crack active directory.

require 'win32ole'
domain = WIN32OLE.connect("WinNT://my_domain.com")
user = domain.Create("user", "my_username")
user.FullName = "Foo Bar"
user.Description = "just a lil ol' test of how ruby <3 ADSI"
user.SetPassword = "my_password"
user.SetInfo

now that i’ve been freed of point-n-click-administration hell, i wonder what i’m going to do with all that free time.

Blog at WordPress.com.