mounting windows shares to mac os 10.7.4 on VPN

Posted on 2012-09-12
Last Modified: 2012-09-29
I have a script to mount shares for a mac.  I use

mkdir -p /Volumes/volumename
mount -t smbfs //servername(IPaddress)/sharename/foldername  /Volumes/volumename

I then have aliases on the desktop to display a different name for the folder than the share name.  Everything works fine if I am connected to the domain.  The user is logging in using windows domain credentials. When the user is off the domain and using the vpn the script fails with an authentication error.  If the user clicks on one of the aliases on the desktop it says, "The alias 'AliasName' can't be opened because the original item can't be found" This is understandable since the script hasn't mounted the volumes yet but if the user clicks ok and the runs the script again the script runs fine without any authentication errors and all volumes are mounted.  The aliases on the desktop can then be opened and they resolve. Also if I put the username and password into the script it works but this is not a solution that will work as per the domain policy passwords are changed every 90 days.  I am looking to mount these volumes cleanly when the user is connected to the VPN.  

Any help with this would be greatly appreciated,
Question by:danskoit
    LVL 9

    Expert Comment

    Have you tried using an alternate method of mounting the shares such as the connect to server option from the finder.  Command + K from finder.


    Accepted Solution

    This does not work either.  I have just set up boot camp with Windows if the user needs to use the vpn with network drives available.

    Author Closing Comment

    I wasn't able to get an answer that worked and it wasn't needed any longer.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    If you are using Mac OS X and have a large number of login items set up in accounts, under system preferences, you may find that your computer is sluggish and unresponsive during startup until everything is done launching. Another problem that a…
    Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built onto of the OSX Server NetBoot system and uses images & workflows as its core assets. While work…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now