Solved

Ldap Impersonation (kinda?)

Posted on 2004-09-28
8
680 Views
Last Modified: 2006-11-17
Hello,

During a rollout of SP2 we are moving everyone into a new OU (sp2liveou). When testing the code it works fine for me and happily moves machines about as I have the rights to do that.. However, the 12,000 users don't. Can anyone tell me how to change my fairly simple script to use a specific domain account we already have to do the move on the users computer. The script is in VBscript and is currently using a .movehere to move the computer account. I am looking for a kind of impersonation for ldap if that (or any of this ramble) makes sense.

Many thanks,

Jamie.
0
Comment
Question by:purejamie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 12171458
Youn can always use the RUNAS command.  Here's a link to more details.
http://www.tek-tips.com/faqs.cfm?fid=2760
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12171493
If you want to do it all from inside VB, to hide the password, then here's another possibility.  See the accepted answer.
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20550779.html?query=runas&topics=93
0
 

Author Comment

by:purejamie
ID: 12173712
Thanks a lot fot the links BlueDevilFan, iif all else fails I will use the RUNAS command, but as the whole thing is running from inside an MSI I would prefer to do the whole lot in the script. Is there anyway to attach an username/password to an LDAP string or something similar in VB?

Cheers,
Jamie.
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 12173865
0
 

Author Comment

by:purejamie
ID: 12178510
Thanks for the link, almost there! However, does anyone know how to do the dso stuff in VBscript; all the links i have seen have been for VB (dimimg dso as etc.) can't seem to get it working in VBscript... Any ideas? Thanks again...
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12178676
This works for me.  

Set DSO = CreateObject("DSOleFile.PropertyReader")
Set Props = DSO.GetDocumentProperties(FileName)

You then get the properties by referencing Props.PropertyName
0
 

Author Comment

by:purejamie
ID: 12178732
Classic. All working, many thanks BlueDevilFan.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12179159
You're welcome!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question