Why do you need to get the password? How does the LDAP module do it's authentication checks? Usually an LDAP client will just bind with the username and password supplied by client and if successful you've passed the test. There are other ways, but I need to check what the LDAP module docs.