Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8005923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:20:55+00:00 2026-06-04T17:20:55+00:00

I am trying to port over Thunderbird/Firefox profile customization scripts from OS X to

  • 0

I am trying to port over Thunderbird/Firefox profile customization scripts from OS X to Windows 7. On OS X they are super simple, using ldapsearch -x -h ldap.place.edu uid="username" to retrieve the email address, real name etc from the OpenLDAP server then throwing these variables into the various configuration files before the applications are loaded.

On Windows this is much more complex, I started trying to use the search.vbs activedirectory/ldap tool that comes with Windows Server 2003 but it doesn’t work properly, I also tried simply writing a quick vbs script to connect and query but I always get errors either that the server won’t process the request or that just fails… here is my latest vbs script that totally flunks out…

Dim oConn,oRS,vSearch,vCount,vMailList,vValue,vProblem,vMsg

vProblem = False

vSearch = "(uid=username)"

Set oConn = CreateObject("ADODB.Connection")
oConn.Provider = "ADsDSOObject"
oConn.Open "ADs Provider", "ou=people,dc=place,dc=edu"

Set oRS = oConn.Execute("<LDAP://ldap.place.edu/dc=edu/dc=place>;" & vSearch &_";cn,mail")

vCount = 1
While not oRS.EOF

   For Each vValue in oRS.Fields(0).value
      WScript.Echo vValue
   Next

vCount = vCount + 1
oRS.MoveNext
Wend
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:20:56+00:00Added an answer on June 4, 2026 at 5:20 pm

    Figured it out a little while back and totally forgot about this, so here it is. I realised I was trying to connect to a anonymous server but was providing a DN while implies a password level of authentication instead of the simple version I needed.

    'Server name
    sRoot = "LDAP://server"    
    Dim oDS: Set oDS = GetObject("LDAP:")
    'Don't provide a DN for anonymous authentication, also &H0010 implies simple auth mode
    Dim oAuth: Set oAuth = oDS.OpenDSObject(sRoot, "", "", &H0010)
    Dim oConn: Set oConn = CreateObject("ADODB.Connection")
    oConn.Provider = "ADSDSOObject"
    oConn.Open "Ads Provider", sDN
    Dim rs
    'Execute query
    Set rs = oConn.Execute("<" & sRoot & ">;(uid=testuser);cn,mail;subtree")
    'retrieve values
    z = rs.Fields.Item(0).Value
    x = rs.Fields.Item(1).Value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to port a Perl script over from Unix to Windows but am
I'm trying to port over a tarot fortune card reading game from the iPhone
I'm trying to port code over to compile using Microchip's C18 compiler for a
I'm trying to port an app from Windows 8 to Windows Phone 7 and
I'm trying to port an application from using HAL to using pure udev. It
I'm trying to port a database from SQL Server Express over to my MySQL
I am trying to port an Oracle database over to Postgres by editing scripts
I'm trying to port over some Core Data code over from a test Mac
I am trying to use local port forwarding to access remote host over a
I am trying to port my working code from Mac OS X to GNU/Linux.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.