O
OregonSteve
Greetings-
Mixed W2K, W2K3 domain; single site; 3 DCs. Using NetWare client to log
into NetWare file servers and Windows client to authenticate to Domain and
access Windows file servers. Workstations are XP Pro SP1.
Some users sometimes don't get their Home directory mapped when they log in.
They can restart two or three times until they get it. At the same time,
we're using a logon script (VBS) through a GPO, mapping two or three drives.
Again, some people SOMETIMES get an error and don't get those drives mapped.
Here is the error and the script:
Script:
\\Domain.com\SysVol\Domain.com\Policies\...\...\...\...\Lscript.vbs
Line: 54
Char: 4
Error: Logon Failure: The target accouint name is incorrect.
Code: 80070574
Source: (null)
Line 54 is where it identifies the Provider: Set objUser =
GetObject("WinNT://" _
& strDomain & "/" _
& strUserName & ",user")
----------------------------------
'System Login Script
Dim WSHNetwork, FSO, strUserName, strUserDomain, ObjGroupDict, objGroup
'---------THIS SECTION SETS VALUES FOR VARIABLES -----------------
Set WSHNetwork = wscript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
strUserName = ""
While strUserName = ""
wscript.Sleep 500
strUserName = WSHNetwork.UserName
Wend
strUserDomain = WSHNetwork.UserDomain
Set ObjGroupDict = CreateMemberOfObject(strUserDomain, strUserName)
'----------THIS SECTION NAMES THE SECURITY GROUPS------------------
For Each objGroup In ObjGroupDict
Select case Ucase(objGroup)
case "- INFORMATION SYSTEMS"
call InformationSystems
case "IS_TECHS"
call IS_Techs
case "IS_TRAIN"
call IS_Train
case else
End Select
Next
'----THIS SECTION CREATES THE DICTIONARY OBJECTS ENUMERATING GROUP
MEMBERSHIP----
Function CreateMemberOfObject(strDomain, strUserName)
Dim objUser, objGroup
'====================================================
'BEGIN LDAP PROVIDER CALL; PREFERRED METHOD OF GATHERING GROUP INFO;
WIN2K/XP ONLY
' Set CreateMemberOfObject = CreateObject("Scripting.Dictionary")
' Set objSysInfo = CreateObject("ADSystemInfo")
' Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
' For Each objGroup In objUser.Groups
' CreateMemberOfObject.Add objGroup.sAMAccountName, "-"
' Next
'END LDAP PROVIDER
'====================================================
Set CreateMemberOfObject = CreateObject("Scripting.Dictionary")
CreateMemberOfObject.CompareMode = vbTextCompare
Set objUser = GetObject("WinNT://" _
& strDomain & "/" _
& strUserName & ",user")
For Each objGroup In objUser.Groups
CreateMemberOfObject.Add objGroup.Name, "-"
Next
Set objUser = Nothing
End Function
'===================================================================
'------------------------- end of main script ----------------------------
'===================================================================
'---------THIS SECTION MAPS DRIVE LETTERS BASED ON GROUP MEMBERSHIP--------
Sub InformationSystems
WSHNetwork.MapNetworkDrive "I:", "\\Server1\IS\Data", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub
'--------------------------------------------------------------------------
Sub IS_Techs
WSHNetwork.MapNetworkDrive "T:", "\\Server1\IS\Techs", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub
'--------------------------------------------------------------------------
Sub IS_Train
WSHNetwork.MapNetworkDrive "I:", "\\Server1\IS\Data\Train", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub
Mixed W2K, W2K3 domain; single site; 3 DCs. Using NetWare client to log
into NetWare file servers and Windows client to authenticate to Domain and
access Windows file servers. Workstations are XP Pro SP1.
Some users sometimes don't get their Home directory mapped when they log in.
They can restart two or three times until they get it. At the same time,
we're using a logon script (VBS) through a GPO, mapping two or three drives.
Again, some people SOMETIMES get an error and don't get those drives mapped.
Here is the error and the script:
Script:
\\Domain.com\SysVol\Domain.com\Policies\...\...\...\...\Lscript.vbs
Line: 54
Char: 4
Error: Logon Failure: The target accouint name is incorrect.
Code: 80070574
Source: (null)
Line 54 is where it identifies the Provider: Set objUser =
GetObject("WinNT://" _
& strDomain & "/" _
& strUserName & ",user")
----------------------------------
'System Login Script
Dim WSHNetwork, FSO, strUserName, strUserDomain, ObjGroupDict, objGroup
'---------THIS SECTION SETS VALUES FOR VARIABLES -----------------
Set WSHNetwork = wscript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
strUserName = ""
While strUserName = ""
wscript.Sleep 500
strUserName = WSHNetwork.UserName
Wend
strUserDomain = WSHNetwork.UserDomain
Set ObjGroupDict = CreateMemberOfObject(strUserDomain, strUserName)
'----------THIS SECTION NAMES THE SECURITY GROUPS------------------
For Each objGroup In ObjGroupDict
Select case Ucase(objGroup)
case "- INFORMATION SYSTEMS"
call InformationSystems
case "IS_TECHS"
call IS_Techs
case "IS_TRAIN"
call IS_Train
case else
End Select
Next
'----THIS SECTION CREATES THE DICTIONARY OBJECTS ENUMERATING GROUP
MEMBERSHIP----
Function CreateMemberOfObject(strDomain, strUserName)
Dim objUser, objGroup
'====================================================
'BEGIN LDAP PROVIDER CALL; PREFERRED METHOD OF GATHERING GROUP INFO;
WIN2K/XP ONLY
' Set CreateMemberOfObject = CreateObject("Scripting.Dictionary")
' Set objSysInfo = CreateObject("ADSystemInfo")
' Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
' For Each objGroup In objUser.Groups
' CreateMemberOfObject.Add objGroup.sAMAccountName, "-"
' Next
'END LDAP PROVIDER
'====================================================
Set CreateMemberOfObject = CreateObject("Scripting.Dictionary")
CreateMemberOfObject.CompareMode = vbTextCompare
Set objUser = GetObject("WinNT://" _
& strDomain & "/" _
& strUserName & ",user")
For Each objGroup In objUser.Groups
CreateMemberOfObject.Add objGroup.Name, "-"
Next
Set objUser = Nothing
End Function
'===================================================================
'------------------------- end of main script ----------------------------
'===================================================================
'---------THIS SECTION MAPS DRIVE LETTERS BASED ON GROUP MEMBERSHIP--------
Sub InformationSystems
WSHNetwork.MapNetworkDrive "I:", "\\Server1\IS\Data", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub
'--------------------------------------------------------------------------
Sub IS_Techs
WSHNetwork.MapNetworkDrive "T:", "\\Server1\IS\Techs", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub
'--------------------------------------------------------------------------
Sub IS_Train
WSHNetwork.MapNetworkDrive "I:", "\\Server1\IS\Data\Train", False
' WSHNetwork.MapNetworkDrive "<drive letter>:",
"\\<server>\<share>\<folder>", False
End Sub