Password format in LDAP

Version 1
    This document was generated from CDN thread

    Created by: WALTER OSELE on 21-05-2009 07:28:31 AM
    Hi,
     
    does anybody know in which format the userPassword is stored in LDAP (Callmanager 4.x)?
       o=cisco.com -> ou=Users -> userPassword
     
    For example if the userPassword is "testt" the stored value is " u8?3?w a??+ ?" - not the common hexstring for md5.
     
    I'm trying to write an ip phone service with user/password check against the Callmanager LDAP.
    An example in Java how to compare the password hash would be perfect
     
    thanks

    Subject: RE: Password format in LDAP
    Replied by: Anitha V on 21-05-2009 10:46:04 AM
    Hi Walter,
     
    It looks like, all the data in LDAP would be base64 encoded.
     
    Regards,
    Anitha

    Subject: RE: Password format in LDAP
    Replied by: WALTER OSELE on 21-05-2009 01:17:57 PM
    thanks for your reply,
     
     the stored value for "testt" is " u8?3?w a??+ ?"
     
     m = MessageDigest.getInstance("MD5");
                        log.info("supplied digest "+m.digest("testt".getBytes()));
    gives: supplied digest [B@15367a7 (not always the same)
     
    log.info("supplied digest base64 "+Base64.encodeBytes(m.digest("testt".getBytes())));
    gives: supplied digest base64 FHU42jOLdwth5ZKvySse5g== (always the same)
     
    so I still can't figure it out...

    Subject: RE: Password format in LDAP
    Replied by: Sascha Monteiro on 27-05-2009 10:16:35 AM
    you could just try to bind with that users account details, if successful..it's credentials are valid

    Subject: RE: Password format in LDAP
    Replied by: WALTER OSELE on 27-05-2009 01:06:14 PM
    Good workaround - thank you, I will go with this.
     
    In future maybe I want to make a webpage for my service and a feature "change password" would be nice to have.
    So if somebody has the information about the encryption I would still appreciate it...

    Subject: RE: Password format in LDAP
    Replied by: Sascha Monteiro on 28-05-2009 04:08:11 AM
    you can use AXl SOAP for that, use the updateUser method (assuming you don't have an external LDAP sync/integration)

    Subject: RE: Password format in LDAP
    Replied by: WALTER OSELE on 28-05-2009 06:53:08 AM
    Thanks again Sascha.
    Question resolved!