Advertisement

08.28.2008 at 12:43PM PDT, ID: 23686922 | Points: 500
[x]
Attachment Details

LDAP query does not work in vb script login script

Asked by mvatter in VB Script, Lightweight Directory Access Protocol (LDAP), Server Software

Tags: ,

I am running the following login script on a windows 2000 server domain controller.  It errors out on the ldap line.  It tells me that the server or domain does not exist.  As far as I can tell the server is set up correctly.  Users can log in and drives are mapped using a script that does not make the ldap query into the active directory.  I am fairly new at this any advise would be helpful.  thanksStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
Option Explicit
 
Dim objNetwork, objUser, CurrentUser
Dim strGroup
 
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
 
' -----  H1 S1 Common Shares  -----
 
'objNetwork.RemoveNetworkDrive "S:"
objNetwork.MapNetworkDrive "S:", "\\Offsite-server\Senate_House_shared"
 
'objNetwork.RemoveNetworkDrive "O:"
objNetwork.MapNetworkDrive "O:", "\\Offsite-server\House_shared"
 
' -----  H1 Shares  -----
 
'If InStr(strGroup, "cn=h1") Then
'	WScript.Echo "H1"
'	objNetwork.MapNetworkDrive "h:", "\\Server\Users\" & objNetwork.UserName
'	objNetwork.RemoveNetworkDrive "O:"
'	objNetwork.MapNetworkDrive "O:", "\\Offsite-server\H1_shared"
'ElseIf InStr(strGroup, "cn=s1") Then
'	WScript.Echo "S1" 
'	objNetwork.MapNetworkDrive "h:", "\\YourServer\Users\" & objNetwork.UserName
'	objNetwork.RemoveNetworkDrive "O:"
'	objNetwork.MapNetworkDrive "O:", "\\Offsite-server\s1_shared"
 
'End If
 
WScript.Quit
 
Loading Advertisement...
 
[+][-]08.28.2008 at 12:49PM PDT, ID: 22339047

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 12:50PM PDT, ID: 22339054

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 12:50PM PDT, ID: 22339057

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 12:55PM PDT, ID: 22339117

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 07:28AM PDT, ID: 22345703

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 07:47AM PDT, ID: 22345954

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628