Results 1 to 7 of 7

Thread: Check rights before mapping networks drives..

  1. #1
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Hi
    My problem is that network drives that are mapped up in an logon script controlled by GPO does not run while on VPN connection.

    So my idea is that i have an logon script that only maps up the drives that the users have permission to access.

    I use Sonicwall global vpn client and it runs the users logon script from ad after it connects and it works great, but i can't have all the drives in that script.

    can someone help me with this?

  2. #2
    OTHMAN is offline 10+ Helpful Posts Happy to be helping others
    Join Date
    Dec 1969
    Posts
    13

    Default

    Quote Originally Posted by froand
    Hi
    My problem is that network drives that are mapped up in an logon script controlled by GPO does not run while on VPN connection.

    So my idea is that i have an logon script that only maps up the drives that the users have permission to access.

    I use Sonicwall global vpn client and it runs the users logon script from ad after it connects and it works great, but i can't have all the drives in that script.

    can someone help me with this?
    Can you post a sample of your script?

  3. #3
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    @echo off

    net use L: \\hercules\logo /persistent:no

    I use the same login script in "User profile - Logon script" in users properties in AD. Here it works well both with vpn and login on locally.

    But now I have started to controll the mapping of disk drives with GPO, and that works great login on locally but not when I log on to VPN.

    Do you see any solution?

  4. #4
    OTHMAN is offline 10+ Helpful Posts Happy to be helping others
    Join Date
    Dec 1969
    Posts
    13

    Default

    Quote Originally Posted by froand
    @echo off

    net use L: \\hercules\logo /persistent:no

    I use the same login script in "User profile - Logon script" in users properties in AD. Here it works well both with vpn and login on locally.

    But now I have started to controll the mapping of disk drives with GPO, and that works great login on locally but not when I log on to VPN.

    Do you see any solution?
    Can you check if the gpo is actually applied to the users:
    Steps:
    1- Logon using the VPN
    2- run - cmd - gpresult /v or gpresult /scope user /v
    3- Search for the script(batch file, if it is there)

    --
    PS. BTW the result will be very long, you can save to a file:
    gpresult /v > c:\vnp_gpo.txt

  5. #5
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Not able to check it today, i'll do it tomorrow.

  6. #6
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Download memberof.exe from at http://www.joeware.net/freetools/tools/memberof/index.htm. You may use the following in the logon script to run the command when the user is a member of a specific security group. In the example below, I have assumed your security group is called Hercules

    [code:1]memberof.exe -q | find /i "Hercules"
    if %ERRORLEVEL%*==0* "net use L: \\hercules\logo /persistent:no" [/code]

  7. #7
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    memberof.exe -q | find /i "Hercules"
    if %ERRORLEVEL%*==0* "net use L: \\hercules\logo /persistent:no"
    That worked great, thnx a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO