Error 53 when updating Active Directory password with Ruby -


i'm having bit of trouble trying add password active directory accounts created ruby script. ssl connection established with:

ldap = ldap::sslconn.new(ldap_host, ssl_port) 

plain text passwords run through function return base 64 utf-16le string.

def convert_to_unicode pwd     unicode_pwd = pwd.encode("utf-16le")     return base64.encode64(unicode_pwd) end 

adding entries ad aren't issue password put in returns error 53: unwilling perform. passwords being passed in meet ad requirements , don't have problems when done through bash script. example running following through convert_to_unicode should return quoted new_password1 ad set.

'"new_password1"' 

wondering if has useful can point me towards might missing.

have tried run encoding utf-16le?

  def microsoft_encode_password pwd     ret = ""     pwd = "\"" + pwd + "\""     pwd.length.times{|i| ret+= "#{pwd[i..i]}\000" }     ret   end 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -