Announcement

Collapse
No announcement yet.

Mapped dive gets disconnected

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mapped dive gets disconnected

    Hi there,

    I have a network with about 30 work stations. They all have a drive P mapped
    to the server (2008 R).
    A few do not get connected to the mapped drive, when the users log in. It does
    not happen every tine. Some are running XP SP2 some Windows 7.
    When I am in the office I re-mapped them fast but when I'm not in, is a major
    problem. Re-mapping requires server's user name and password, and I do not
    want to share it with the office.

    Any suggestions ? Maybe a script to reconnect .. ?

    Thank you, for your consideration and time. Alex

  • #2
    Re: Mapped dive gets disconnected

    Is this a domain or a workgroup?
    You can encrypt credentials in a script:
    http://www.google.co.uk/search?hl=en...1c.QMiXyXfa4aQ
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Mapped dive gets disconnected

      It is a domain, and the work stations that give me this problem, connect thru
      remote desktop.


      [QUOTE=Ossian;263272]Is this a domain or a workgroup?
      You can encrypt credentials in a script:

      Comment


      • #4
        Re: Mapped dive gets disconnected

        If its a domain, why do you need credentials -- just give suitable permissions on the share (NTFS AND Share Permissions) and users will automatically get access
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: Mapped dive gets disconnected

          I feel your pain!!! Used to have that problem myself, pain in the neck, untill i did this below. This will map the drive to anyone that logs into the terminal server. You did say they logged in using remote desktop, so i'm assuming your running TS, But u still have to do what Ossian said.


          Use your Domain Controller to map the drive...... If you haven't created your own GPO, then go to Default Domain Policy\User Configuration\Preferences\Window Settings\Drive Maps. If you have your own GPO, go to same location under your GPO.

          Right Click and select New Mapped Drive. Map the drive in the "Location Box", and set up "Label As", just don't use A thru D sometimes E.

          open up a cmd prompt, and type in gpupdate /force. Log off the terminal server users then back on.

          This is how my company is set up, it's a beautiful thing!!!!
          Last edited by Kobe 310; 23rd August 2012, 13:59.

          Comment


          • #6
            Re: Mapped dive gets disconnected

            Thanks for your input, I was trying something else, but it's not working.
            I have a bat file, to run when user logs in thru TS. But it's not working.
            Here is my file:
            ECHO Begin Mapping Drives
            net use P: \\SV2\DATAPART1 pass /USER:Administrator\SFNG.LOCAL
            exit


            P is the drive
            SV2 server name
            DATAPART1 share name
            pass password
            Administrator user name
            SFNG.LOCAL is the domain



            Originally posted by Kobe 310 View Post
            I feel your pain!!! Used to have that problem myself, pain in the neck, untill i did this below. This will map the drive to anyone that logs into the terminal server. You did say they logged in using remote desktop, so i'm assuming your running TS, But u still have to do what Ossian said.


            Use your Domain Controller to map the drive...... If you haven't created your own GPO, then go to Default Domain Policy\User Configuration\Preferences\Window Settings\Drive Maps. If you have your own GPO, go to same location under your GPO.

            Right Click and select New Mapped Drive. Map the drive in the "Location Box", and set up "Label As", just don't use A thru D sometimes E.

            open up a cmd prompt, and type in gpupdate /force. Log off the terminal server users then back on.

            This is how my company is set up, it's a beautiful thing!!!!

            Comment


            • #7
              Re: Mapped dive gets disconnected

              With regards to the command to map the drive. See what happens with this below.
              The @echo off will hide the rest of the command from the window, so if you test on your desktop first with a batch file then you might not want to include it.

              ECHO Begin Mapping Drives
              @echo off
              net use P: \\SV2\DATAPART1 /USER:SFNG.LOCAL\Administrator password
              Last edited by uk_network; 27th August 2012, 21:05.
              Please remember to award reputation points if you have received good advice.
              I do tend to think 'outside the box' so others may not always share the same views.

              MCITP -W7,
              MCSA+Messaging, CCENT, ICND2 slowly getting around to.

              Comment


              • #8
                Re: Mapped dive gets disconnected

                I wouldn't ever add an admin account in a script for anything but testing purposes.

                Comment


                • #9
                  Re: Mapped dive gets disconnected

                  You don't need a .bat file, just map the drive in the location part. ex. \\ipaddress\share

                  On your .bat file, you might want to try using the ip address instead of the net bios name, i have that problem ALOT!!!!


                  net use P: \\192.168.1.100\DATAPART1 pass /USER:Administrator\SFNG.LOCAL

                  In speaking about Administrators, make sure if you get it to work with the admin, you test a domain user. It may work for Admin, and then i think i have it figured out, and get bubble burst when it doesn't work for domain users because of gp policy.
                  Last edited by Kobe 310; 5th September 2012, 14:37.

                  Comment


                  • #10
                    Re: Mapped dive gets disconnected

                    Just set the correct NTFS and Share permissions for the users, or better a group where the users belong to.
                    Using an admin account to map a drive is just nuts.
                    Marcel
                    Technical Consultant
                    Netherlands
                    http://www.phetios.com
                    http://blog.nessus.nl

                    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                    "No matter how secure, there is always the human factor."

                    "Enjoy life today, tomorrow may never come."
                    "If you're going through hell, keep going. ~Winston Churchill"

                    Comment


                    • #11
                      Re: Mapped dive gets disconnected

                      Use this instead. Place it in the startup folder on each PC or apply it as you see fit. Copy it into notepad and save it with a .vbs extension. It never failed in our environment.




                      Option Explicit

                      Dim WshNetwork, oDrives, i

                      '-- Setting objects --
                      Set WshNetwork = WScript.CreateObject("WScript.Network")
                      Set oDrives = WshNetwork.EnumNetworkDrives

                      DriveMapper "P:", "\\Server\share"

                      Sub DriveMapper(Drive, Share)
                      For i = 0 to oDrives.Count -1 Step 2
                      if LCase(Drive) = LCase(oDrives.Item(i)) then
                      if not LCase(Share) = LCase(oDrives.Item(i+1)) then
                      WshNetwork.RemoveNetworkDrive Drive, true, true
                      Else
                      Exit Sub
                      End if
                      End if
                      Next
                      WshNetwork.MapNetworkDrive Drive, Share
                      End Sub
                      A recent poll suggests that 6 out of 7 dwarfs are not happy

                      Comment

                      Working...
                      X