Automount multiple network shares in OSX May2011
Tags: Applescript, automount, DNS-323, DNS-343, NAS, network attached storage, networking, OSX, tutorial | No Comments
You’ve got multiple network attached storage (NAS) devices. They all have identically named volumes.* You want to connect to all the volumes at startup. You can try the easy way:
- Connect to the share volume(s) that you want to automatically connect to at login.
- Open System Preferences.
- Select the Accounts preference pane
- Click the Login Items tab.
- Click “+” to add an item.
- Navigate to the network share, and click Add.
However, this doesn’t work when your volumes have the same name. It will result in your computer automatically connecting to only one of the shares on startup. If you can’t rename the volume, you’ll have to create a small application using Applescript Editor:
- Launch Applescript Editor (Press CMD+Space and type Applescript).
- Type mount volume “smb://server/share”for each share you want to automount.
- For example, if your NAS is connected at 192.168.1.301 and the volume name is Volume_1, type in mount volume “smb://192.168.1.301/Volume_1″
- If one of the volumes requires a username and password, type mount volume “smb://username:password@server/share”
- Click File > Save As.
- Select a place to save the script, but select “Application” from the dropdown just under the filename input.
- Open System Preferences.
- Select the Accounts preference pane
- Click the Login Items tab.
- Click “+” to add an item.
- Navigate to where you saved your application, and click Add.
- Close System Preferences and Reboot.
This technique should help resolve any confusion for your users about which share is mounting and which share is missing.
*For example, D-link’s DNS-343 and DNS-323 line of NASes do not let you change the volume name (and you don’t want to use a workaround)




Leave a Reply