Users see all Users Folders instead of just Individual User Folder

Discussion in 'Active Directory' started by TeeCee, Jul 17, 2008.

  1. TeeCee

    TeeCee Guest

    I thought that technology helpdesk techs were logging on as local
    administrator and mapping to the USERS$ on our Organization's File Server to
    do adminsitrative tasks for troubleshooting and using the same drive as the
    script that runs for logon uses to map each individual to their user folder.

    But then, this happens to me and I rarely log on as local administrator and
    I don't map to the USERS$ for any reason.

    I have the users disconnect the mapped drive and then log off and back on
    and they are fine again but why is this happening?

    Example: A user logs on like most organizations: the script directs them to
    H as their User mapped drive. But, many times, a user logs on and the H
    drive is USERS$ and all folders can be seen instead of just the user folder.

    TeeCee
     
    TeeCee, Jul 17, 2008
    #1
    1. Advertisements

  2. Hello TeeCee,

    Can you post the logon script you are using.

    Best regards

    Meinolf Weber
     
    Meinolf Weber, Jul 17, 2008
    #2
    1. Advertisements

  3. TeeCee

    TeeCee Guest

    The first part: H drive is the Users's share:
    Option Explicit
    On Error Resume Next

    Dim objNetwork, objUser, CurrentUser, AllUsersStartMenu, strGroup,
    AllusersStartup
    Dim WshShell, oShortcut, strDesktop, oFileSys, UserObj, Group

    Set oFileSys = Wscript.CreateObject("Scripting.FileSystemObject")
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    Set objNetwork = CreateObject("WScript.Network")
    Set UserObj = GetObject("WinNT://" & objNetwork.UserDomain & "/" &
    objNetwork.UserName)

    AllUsersStartMenu = WshShell.SpecialFolders("AllUsersStartMenu")
    AllUsersStartup = WshShell.SpecialFolders("AllUsersStartup")

    'Debug Information
    'WScript.Echo strGroup
    'WScript.Echo objUser.UserName
    'WScript.Echo objNetwork.UserName
    'WScript.Echo objUser.DomainDNSName
    'WScript.Echo objUser.SiteName
    'WScript.Echo "\\nasvs1\user$\" & objNetwork.UserName

    'Set all drives to be removed here.
    objNetwork.RemoveNetworkDrive "F:"
    objNetwork.RemoveNetworkDrive "H:"
    objNetwork.RemoveNetworkDrive "W:"
    objNetwork.RemoveNetworkDrive "G:"

    Then, later in the script after just special application launches:

    '=========================================================================================================
    objNetwork.MapNetworkDrive "W:", "\\nasvs1\4700$\apps"
    objNetwork.MapNetworkDrive "F:", "\\nasvs1\Shared"
    objNetwork.MapNetworkDrive "H:", "\\nasvs1\users$\" & objNetwork.UserName

    'Call Sub routine that performs Global Mappings/Shortcuts
    ProcessGlobals

    'Prep Startup Folder, copy shortcuts to startup
    If Not CheckFolder(AllUsersStartup & "\Application Launcher") Then
    'oFileSys.CopyFolder AllUsersStartMenu & "\Application
    Launcher",AllUsersStartup & "\Application Launcher",1
    Else
    oFileSys.DeleteFolder AllUsersStartup & "\Application Launcher",1
    ' oFileSys.CopyFolder AllUsersStartMenu & "\Application
    Launcher",AllUsersStartup & "\Application Launcher",1
    End If

    Set oShortcut = WshShell.CreateShortcut(AllusersStartup & "\Application
    Launcher.lnk")
    oShortcut.TargetPath = AllUsersStartMenu & "\Application Launcher"
    oShortcut.WindowStyle = 3
    oShortcut.Description = "APP Launcher"
    oShortcut.Save
     
    TeeCee, Jul 17, 2008
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.