can you 'map' a network drive in OSX?

Posted:
in macOS edited January 2014
I have five different servers that I need to connect to at work. Is there a way to make these drive automatically mount?

Comments

  • Reply 1 of 8
    outsideroutsider Posts: 6,008member
    Have you tried putting it in your start up items list?
  • Reply 2 of 8
    kedakeda Posts: 722member
    This would work to get me to a login prompt, but I'd like the drive to mount automatically (including authentication). can this be done?
  • Reply 3 of 8
    outsideroutsider Posts: 6,008member
    If you click options you can save your password. Now I haven't tried this in a while so it may still ask you to click OK but in my experience with files on an unmounted drive they simply open up (the drive mounts and since my password is saved the file simply opens). It may work the same way if you save the password in the options button.
  • Reply 4 of 8
    kedakeda Posts: 722member
    Cool.



    This Mac is at work, so I'll try it tomorrow.
  • Reply 5 of 8
    xoolxool Posts: 2,460member
    Quote:

    Originally posted by Outsider

    If you click options you can save your password. Now I haven't tried this in a while so it may still ask you to click OK but in my experience with files on an unmounted drive they simply open up (the drive mounts and since my password is saved the file simply opens).



    From what I recall open aliases to files on networked drives does work like this. If the fileserver is not mounted, the Finder will mount it in the background and then open the alias. I have placed networked folder aliases in my Finder sidebar and the drive is mounted automatically if I click it. It then reveals the contents in column view the same way it would if I already mounted the drive.
  • Reply 6 of 8
    davegeedavegee Posts: 2,765member
    Saving the password in your keychain will work fine for afp:// type mounts but for smb:// type mounts you'll have to write an applescript to do your mounting.



    Something like this (replace items as needed - found over at macosxhints.com)

    Code:




    tell application "Finder"

    try

    mount volume "SMB://WORKGROUP;USERNAME:PASSWORD@SERVER/SHARE"

    on error

    display dialog "There was an error mounting the Volume." & return & return & ¬

    "The server may be unavailable at this time." & return & return & ¬

    "Please inform the Network Administrator if the problem continues." buttons {"Okay"} default button 1

    end try

    end tell









    Dave
  • Reply 7 of 8
    If you are looking at auto-mounting at boot (not login) then macOS X Hints has a pair of hints for AFP and NFS and SMB.
  • Reply 8 of 8
    baumanbauman Posts: 1,248member
    Quote:

    Originally posted by DaveGee

    Saving the password in your keychain will work fine for afp:// type mounts but for smb:// type mounts you'll have to write an applescript to do your mounting.

    ...snip...

    Dave




    Really? I mount a smb share regularly through an alias with a saved password. Never any problems.



    The one thing that gets me, though, is that my Mac seems to have a problem holding on to the server. This is simply not a problem with on a PC (which is mapped to the same server), so I don't think it's the server. It always sucks when you're working off of the server, and then it gets disconnected, and you easily lose all your work if you don't tip-toe around.
Sign In or Register to comment.