Tuesday, August 28, 2007

MacOS: Automatically Mounting Network Drive on Mac With or Without Automator

Ever since I put my LaCie ED Mini Network Attached Storage (NAS) on the network, I had to manually mount the ED Mini every time I rebooted the computer. This was very inconvenient, as you go to the Finder and everytime you re-connect you need to type in the password. I have been searching the way to do this easier and finally figured this one out.

One word of caution. Anything you do, password string will be included.

The easiest way to do this, but not secure as password is out in clear text is to do this,

Go to Connect To Server on Finder and punch in your NAS's IP address. In my example I am using 192.168.1.10, it will obviously be different at your home. Suppose your user name is many and password of zyzzx and my Apple file share is called ED_mini then the syntax is,

afp://manny:zyzzx@192.168.1.10/ED_mini

May be a bit more secure way to do this is to use Automator and then create an Application and include the following Apple Script.

on run {input, parameters}

mount volume "afp://manny:zyzzx@192.168.1.10/ED_mini"

return input
end run
  1. Open the automator
  2. Select the Automator from the Library menu
  3. Drag Run Apple Script to the workspace on the right.
  4. You will see the spot to(* Your script goes here *) repalce that with the connection script of mount volume "afp://manny:zyzzx@192.168.1.10/ED_mini"
  5. Test the script and save as an Application. Close automator.

No comments: