Solved

VPN and mapping drives

Posted on 2014-03-21
10
319 Views
Last Modified: 2014-04-07
Hello
I have established a vpn system for my remote users to be able to use to have access to network resources and or files if needed
Windows AD system
i would like to have the drives mapped automatically and or have  a script run to map the drives
is this possible and if so how
also how would i map the users home directory folder for access via a remote VPN connection
0
Comment
Question by:schuitkds
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 95

Expert Comment

by:John Hurst
ID: 39945874
I find it best and most stable to keep VPN connection and folder mapping separate.

Allow the user to first fire up the computer and make a VPN connection.

Then ask the user to run a script to connect folders. I put the script on the Desktop and it works fine. I usually have an entry in the script to disconnect the drive before connecting it. This usually eliminates problems with persistent drives.

Especially with wireless, it takes time to connect to the internet, then time for the VPN connection to happen and that is why a script after all this to connect folders works best for me.
0
 
LVL 9

Expert Comment

by:M Roe
ID: 39945887
I use the ip address and not the netbios names of servers, etc when i do the mapping since netbios doesn't work well across VPN connections.
0
 

Author Comment

by:schuitkds
ID: 39945920
thank you  
how would i map the users home folder ?
i would like to stay away from having to hard code the users name into each script on each system that needs access
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
LVL 95

Expert Comment

by:John Hurst
ID: 39945932
I use (in a script) NET USE Z: \\servername\folder.    servername can be replaced by IP address or you can use a HOSTS file entry to make the relationship.

You can also add username and password to the script entry.

Open a command prompt and type NET USE /?  to get the various options.

If you do not use username, the user will be prompted.
0
 
LVL 9

Expert Comment

by:M Roe
ID: 39945970
The Home folder of the user should be mapped like
net use z: \\server2\%username% or server2 is the IP address
0
 

Author Comment

by:schuitkds
ID: 39946044
yes but if the users local username is different( on local system ex home computer) then the %username% returns the wrong value and cant map the drive.
0
 
LVL 95

Expert Comment

by:John Hurst
ID: 39946059
Yes, and so either use simple NET USE as I mentioned and allow the user to authenticate; or, else as I inferred, put the username and password in the NET USE statement. You may also need the domain name to qualify the username. But it works. I use this method myself.
0
 

Author Comment

by:schuitkds
ID: 39946142
I do use NET USE but the user is authenticated against the domain based on username and password entered in the VPN client  
ex:  user at home logins to their home system as joe
users id at work jboggins

if i create a script for them to activate manually and try to use the %username% it returns the local account ( joe) and cant map the home drive
being that they used the jboggins id in the VPN login , the net use does not prompt for username and password
0
 
LVL 95

Accepted Solution

by:
John Hurst earned 500 total points
ID: 39946169
So joe should be able to use NET USE Z: \\Server\Folder /user:DOMAIN\jboggins joepassword

joepassword is optional but leaving it out will cause a prompt for it.

The thing here is AD does not know about joe only jboggins
0
 
LVL 95

Expert Comment

by:John Hurst
ID: 39984327
@schuitkds - Thank you and I was happy to assist you with this.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

726 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