Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2010
    Posts
    2

    Unanswered: openLDAP via VBScript.

    Hope I've posted this in the right area and that you can help me

    Hi

    I'm trying to extract data from an LDAP database.

    I can connect fine, and pull some information using this code:

    Code:
    Set ado = CreateObject("ADODB.Connection")
    ado.Provider = "ADSDSOObject"
    ado.Properties("User ID") = "username"
    ado.Properties("Password") = "password"
    ado.Properties("Encrypt Password") = False
    ado.Open "ADS-Anon-Search"
    
    serverName = "10.10.10.1/cn=Units"
    filterStr = "(&(objectclass=unit)(serialnumber=*123456*))"
    
    Set objectList = ado.Execute("<LDAP://" & serverName & ">;" & filterStr & ";ADsPath;SubTree")
    
    While Not objectList.EOF
        WScript.Echo objectList.Fields(0).Value
        objectList.MoveNext
    Wend
    The above returns a list of all live units which match the serial number.
    What I can't seem to do is get any further information from the LDAP 'UNIT \cn=Units'

    I know each Unit in cn=Units, also has:

    ipaddress
    cn
    name
    id
    location
    password
    status

    I have tried to edit ";ADsPath;SubTree" to ";ADsPath,name, id,location;SubTree"
    But this returns an error..

    I have used PHP to get this information, so I know it's there..

    So how do I get it using VBS ??

    Thanks for your time.

  2. #2
    Join Date
    Nov 2010
    Posts
    2
    Quick update. Changing to this allows me to pull some more information.
    Code:
    Set objectList = ado.Execute("<LDAP://" & serverName & ">;" & filterStr & ";cn,description,objectclass,telephonenumber", ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
    BUT as soon as I try to get anything else I get errors.
    eg:
    Code:
    ";cn,id,description,objectclass,telephonenumber"
    Anyone any ideas ? As mentioned PHP works fine !

  3. #3
    Join Date
    Dec 2010
    Posts
    1

    Question Ldap password

    Hi All,

    I have an Open Ldap server with customer login information and Pasword. Is there a way to read this password when a customer forgets his password?

    LDAP use SHA Hash.

    It must be possible because Softera Ldap Browser can read the password. My website is in ASP.


    I hope someone have a solution.
    Thanks,

    Mo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •