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.

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

  1. ah genau das Kommentar wollt ich doch noch beantworten: das ist ein Windows Rechner mit OSX GUI..jap… bisserl modifiziert… Ich benutz dazu “Stardock Windowblinds” und “Stardock Objectdock” und “Yahoo Widget Engine (aka Konfabulator)”

  2. Erst mal vielen Dank für Deine Antwort :-)

    Kannst Du mir sagen wie das Skin heißt oder mir vielleicht sogar einen Link schicken, welches Du da benutzt?


  3. uff, ich hab keine Ahnung mehr. Das is schon ne Weile her und ich benutz es im Moment nichtmehr. Es gibt Skin-Sammel-Seiten für WIndowblinds. Da schau einfach mal.

  4. Normalerweise reicht es, das Icon des Volumes zu den Startobjekten zu ziehen.
    Wenn du dann die zugangsdaten in der keychain hast, sollte der kram beim einloggen gemountet werden.

    Gruss, Alex

  5. My solution is even simpeler and even too “Apple” for me to think of it by myself:

    1. Manually mount a share
    2. Create a shortcut to this share
    3. Drag the shortcut to the space next to the waste bin
    4. Right-click and check “Start-up at boot”

    et voila: the share will mount on boot even without asking for a password. Being a switcher about a year ago I could not think of such a simple and elegant solution myself and read it somewhere on a blog.

    Gruesse, Herman.

Comments are closed.