Solved

Ldap Impersonation (kinda?)

Posted on 2004-09-28
8
678 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
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!

 
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

Industry Leaders: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

751 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