python-ldap change unicodePwd issue
<p>I am already managing different user`s AD attrs with code:</p>

<pre><code>l = ldap.initialize('ldap://172.25.1.2')        
    l.simple_bind_s(admin_dn, admin_pw)

    user_dn="dn_here"
    change_attr = [(ldap.MOD_REPLACE, 'attr_to_change', new_value)]

    l.modify_s(user_dn,change_attr)
    l.unbind_s()
</code></pre>

<p>And it worked for all nessesary attrubutes, except unicodePwd.
After looking for a solution, I`ve found that unicodePwd should be changed using ldaps connection and port 636 
(<a href="https://stackoverflow.com/questions/7716562/pythonldapssl">Python+LDAP+SSL</a>).
So I had tried to use that example:</p>

<pre><code>    ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
    l = ldap.initialize('ldaps://172.25.1.2:636')
    l.set_option(ldap.OPT_REFERRALS, 0)
    l.set_option(ldap.OPT_PROTOCOL_VERSION, 3)
    l.set_option(ldap.OPT_X_TLS,ldap.OPT_X_TLS_DEMAND)
    l.set_option( ldap.OPT_X_TLS_DEMAND, True )
    l.set_option( ldap.OPT_DEBUG_LEVEL, 255 )
    l.simple_bind_s(admin_dn, admin_pw)
    #change unicodePwdCOde here
    l.unbind_s()
</code></pre>

<p>but got an error:</p>

<pre><code>ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server"}
</code></pre>

<p>Should it have any solution in my code, or it should be fixed from AD server config?
Thanks for any help.
Sry for grammar mistakes.</p>