ruby-ldap/ruby-net-ldap — pull request #178 by mynameisrufus (2014-12-18 02:10:40+00:00)
Title: Support for rfc3062 Password Modify, closes #163

This implements the password modify extended request
http://tools.ietf.org/html/rfc3062

Change existing password:

```ruby
dn = 'uid=modify-password-user1,ou=People,dc=rubyldap,dc=com'

auth = {
method: :simple,
username: dn,
password: 'passworD1'
}

ldap.password_modify(
dn: dn,
auth: auth,
old_password: 'passworD1',
new_password: 'passworD2'
)
```

Or get the LDAP server to generate a password for you:

```ruby
dn = 'uid=modify-password-user1,ou=People,dc=rubyldap,dc=com'

auth = {
method: :simple,
username: dn,
password: 'passworD1'
}

ldap.password_modify(
dn: dn,
auth: auth,
old_password: 'passworD1'
)

ldap.get_gen_passwd_result #=> 'VtcgGf/G'
```