How-To mount a network share at login / startup on OSX

When I first worked with a Mac I had many problems finding things and doing things that worked just out of the box on a Windows machine. One thing that was very annoying was that the Mac apparently is not able to mount a network volume at startup. On Windows you are just doing something like this:

But that’s not possible on the Mac. So I had to find another way. The easiest way is to write a script that is executed at startup. And so I did.

Go to your applications folder where you probably find the “Applescript” folder in which you’ll find the “Script Editor“. Start it and you’re ready to write the script which looks like this:

    mount volume "smb://bietiekay@femflawlessfs/1"
end try

Whereas “smb://” is the protocol and “bietiekay” is the username followed by the servername “femflawlessfs” and the share name “1“.

When you did that you can check if it works just by clicking on the “Execute” button in the icon bar of the script editor. Normally you’ll be asked for a username+password. If so enter your username and password and add it to the key chain by activating the checkbox in the username+password dialog. You have to do that to allow the script to mount the share without asking you for the username+password again the next time it runs.

When you checked that everything is working you do a “File->Save as“. Give it a name and most important select “Application” instead of “Script” in the file format select box. I recommend to deselect the “startup dialog” checkbox so you would not get bothered by another dialog at startup…

Now you have a script and the executable application.

Go to the “Apple menu->System Configuration->Users” dialog where you can configure the applications that run at startup/login. Click on the “+” symbol under the startup list and select the application you just made with the script editor.

That’s all. You’re set-up to test this… start your machine and see if it works.