10.4: One way to automount SMB network shares

Feb 07, '07 07:30:02AM

Contributed by: Anonymous

Under Windows you can easily assign a drive letter to a network share, so that every time you login to your account you will have ready access to it. There appears to be no such equivalent under OS X. (You can include them in your user's Login Items list, but each share in the list will spawn a Finder window when it connects.)

I have been digging at the problem for quite some time since I switched to OS X, and I can now give you the solution I found to work the best. It is not trivial, but with the help of this screencast, it should prove rather easy.

Method 1: Using Apple Script

  1. Fire up Script Editor.
  2. Type volume mount "smb://server name/share name" for each share you want to automount. For example, volume mount "smb://nas/mp3" in my example.
  3. Test the code.
  4. Save the code as an AppleScript.
  5. Save the code as an application.
  6. Add the application to your System Accounts Login Items.
Read on for a solution using Automator...

Method 2: Using Automator

  1. Open the Finder and click on the Network icon.
  2. Click on workgroup name (maison in my example).
  3. Click on server name (nas in my example).
  4. Click on the Connect button.
  5. Take note of share names and network server name on a piece of paper.
  6. Open Automator.
  7. Click on Finder under Library section.
  8. Click and drag Get Specified Servers into rightmost screen section.
  9. Click on the + sign in the Get Specified Servers window.
  10. Type smb://server name/share name in the Address: field, and click Connect (smb://nas/mp3 in my example).
  11. Repeat the previous step for the remaining shares you wish to automount.
  12. Click and drag Connect to Servers under the Get Specified Servers section.
  13. Click the Run button to test your workflow.
  14. Save your workflow as a Workflow and Application.
  15. Add your new Application to your System Accounts Login Items.
If you need more assistance, watch the screencast at the above link.

Comments (26)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070202190047133