Aaron T Granberg
(Fresh Scripter)
2009-08-25 10:10 PM
Mapping drives after VPN connection established

Normally our PCs map drives using the following script:

USE u: "\\SERVERNAME\data1\users\" + @userid
USE p: "\\SERVERNAME\data1\projects"
USE o: "\\SERVERNAME\data1\open"

SELECT

CASE InGroup("IT Dept")
USE w: "\\SERVERNAME\data1\workgroup\it"
CASE InGroup("Accounting Dept")
USE w: "\\SERVERNAME\data1\workgroup\accounting"

ENDSELECT

The u: and w: drives depend on the active directory user id and group membership. This works great on our local network.

In order for users to connect to our file server remotely, they must use VPN, which doesn't use windows authentication. Once the VPN connection is established, I can go to start, run, then type \\SERVERNAME\data1\... , I'm prompted for the AD ID and password and if I enter them correctly I can access the file server. If I run the above script, only o: and p: map while u: and w: fail. How can I get the user id and group membership passed to the login script so u: and w: map?

Thanks!


Bryce
(KiX Supporter)
2009-08-26 12:27 AM
Re: Mapping drives after VPN connection established

sounds like the workstations are not authenticating to the AD.

can you try ingroup('\\DC\groupname') perhaps?


LonkeroAdministrator
(KiX Master Guru)
2009-08-26 06:51 AM
Re: Mapping drives after VPN connection established

not knowing your type of vpn or network settings, but one thing to try without knowing those, try to connect with FQDN.
depending on your vpn/firewall setup, you might need to allow some additional traffic in the filters...


Aaron T Granberg
(Fresh Scripter)
2009-08-26 03:28 PM
Re: Mapping drives after VPN connection established

Thank you for the replies. Perhaps more background info will help.

The workstations connecting remotely are not part of the domain. They are employees' personal computers from home.

Only certain IP subnets can access the domain, so remote users must use VPN. Once the VPN is established, the remote workstation is on a subnet that can access the domain. The VPN ID and Password are independent of the domain.

This works correctly, as I can authenticate and access our file server once the VPN is established. However I can not get the login script to map drives based on the domain userid and group membership. It will map drives with static paths using the USE command only.

Thanks again for your help!


Radimus
(KiX Supporter)
2009-08-26 06:20 PM
Re: Mapping drives after VPN connection established

you will need to RUNAS the script file

LonkeroAdministrator
(KiX Master Guru)
2009-08-26 09:38 PM
Re: Mapping drives after VPN connection established

uhm.
not really needing runas...
change the vpn user script to ask for user info.
once you know the username and password, you can use:
use \\server\ipc$ /user:username passwd


Aaron T Granberg
(Fresh Scripter)
2009-08-27 05:13 PM
Re: Mapping drives after VPN connection established

Thanks again for the replies.

Lonkero, regarding the VPN user script, are you referring to a kixtart script that can be initiated after the VPN is established (my VPN doesn't use the active directory domain ID and password)? If so, would you please explain how to make a kixtart scipt ask for user info? An example would be great, or anything to point me in the right direction (I'm definately not a kix master guru).

I appreciate everyone's help on this!


Richard H.Administrator
(KiX Supporter)
2009-08-28 10:05 AM
Re: Mapping drives after VPN connection established

There are three common ways of doing it:
  1. Use the built-in KiXtart commands and prompt at the console. This is the simplest and lightest method, but some people freak out when they can't use a mouse in a dialogue.
  2. Create an Internet Explorer form. Search the site for examples of this. It doesn't require any local installation but can be difficult to control and is subject to MS changing the security model.
  3. Use KiXforms to create a bespoke form. This is the most felixible solution, but requires the KiXforms DLL to be installed / registered on every client.


If you use the KiXtart built-ins for a console solution then search the UDF forum for an alternative to GetS for the password prompt.