In Mac OS X 10.7 (Lion) Apple has replaced good old SMB support. Now I can't auto connect to my shared (SMB) network drives. Workarounds? Or is this impossible? In OS X Snow Leopard, I could automatically connect my Ubuntu (SMB) shared network drives with auto_smb / auto_master (autofs configuration in /private/etc/). I made three mount points (folders) directly in '/Volumes', I used /Volumes/Data and /Volumes/webroot (both SMB shared).

Unfortunately Lion doesn't connect (automount) my network drives. I have to manually connect to the server (Ubuntu file server) in Finder, then open up Terminal to navigate to the mount points, and then it connects. This is not a workable solution. I've searched (Google/SO) but found no solutions apart from an unsupported hack.

Isn't it possible anymore to automatically connect to an SMB-shared drive during startup?

link|improve this question
Belongs on apple.stackexchange.com – Paul R Sep 16 '11 at 13:17
@PaulR: Not necessarily. – Tom Wijsman Apr 14 at 21:25
feedback

migrated from stackoverflow.com Sep 17 '11 at 9:07

This question came from our site for professional and enthusiast programmers.

5 Answers

Here's how can automount a network drive

  1. Connect to your network drive (finder > go > connect to server)

  2. Enter the credentials for your login to your network drive and tick the ‘remember in keychain’

  3. Open system settings > users > login items

  4. Drag the icon for your network drive from your desktop to the startup items.

Source: This article

link|improve this answer
1  
It works :) However if you don't like having Finder popping up every time you login, you could use Automator instead: apple.stackexchange.com/questions/18522/… – wildpeaks May 24 at 15:03
feedback
sudo bash
mkdir /Volumes/Network
vi /etc/fstab

Add something like the following (1 mount per line)

192.168.0.200:/video /Volumes/Network/Video url automounted,url==cifs://user:pass123@192.168.0.200/video 0 0
192.168.0.200:/music /Volumes/Network/Audio url automounted,url==cifs://user:pass123@192.168.0.200/music 0 0
192.168.0.200:/public /Volumes/Network/Public url automounted,url==cifs://user:pass123@192.168.0.200/public 0 0

run automount -vc

bash-3.2# automount -vc
automount: /net updated
automount: /home updated
automount: /Volumes/Network/Audio mounted
automount: /Volumes/Network/Watch mounted
automount: /Volumes/Network/Video mounted
automount: /Volumes/Network/Public mounted

Get out of the sudo session. Browse in finder to /Volumes/Network - whenever you go there they will now just automount. Just tried this in 10.7.3 and it works fine.

link|improve this answer
feedback

You can auto mount a share by dragging the mounted volume to your "Login Items" in User Accounts. That's how I do it and it's worked since 10.5.

Once caveat re SMB shares, is that with Lion the share will take about 30 seconds to mount at startup... this delay is new since Apple replaced SAMBA with their in-house implementation in Lion.

link|improve this answer
I am aware of this workaround, however it's not what I need. The disadvantage of this option is that 2 Finder windows open automatically (even if 'hide' option is checked). In 10.6 autofs worked, mounting my Samba network drives correctly to mount points at /Volumes/... – cyppher Sep 20 '11 at 13:33
feedback

Answer: Can't do it. (OS X Lion 10.7.2)

I tried dragging mounted volumes into my "Login Items" but it just pops up an authentication error when I re-login. Yes, this used to work OK in Leopard, but after I upgraded to Lion, it stopped working.

Whenever I try to connect to my SMB shares using Finder, it gives me the same error.

I am able to mount SMB shares from the command-line, and they will also show up in Finder, once they're mounted, and Finder works just fine after that. So, as long as I go out to command-line to do the mounting, it's OK, but it won't work from "Login Items" or "Connect to Server"

link|improve this answer
I'm going to upvote this because similar experience. Sucks. – David Ryder Mar 11 at 3:57
feedback

Use AppleScript:

In the AppleScript editor enter this:

tell application "Finder"

try

mount volume "cifs://server/share"

end try

end tell

The save the script as an application. Add to your Login StartUp items

link|improve this answer
feedback

protected by Community Apr 16 at 23:13

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.