Solved

Ldap Impersonation (kinda?)

Posted on 2004-09-28
8
676 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 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