schuitkds
asked on
VPN and mapping drives
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
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
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.
ASKER
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
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
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.
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.
The Home folder of the user should be mapped like
net use z: \\server2\%username% or server2 is the IP address
net use z: \\server2\%username% or server2 is the IP address
ASKER
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.
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.
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@schuitkds - Thank you and I was happy to assist you with this.
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.