I can add the share to the login startup items, but it always pops open Finder. I want the AFP share to mount silently. This is in a Mac computer lab with the Macs joined to AD.
3 Answers
I've done this with smb shares and will double check tonight when i get home but iirc you need to write some simple applescript to mount the volume
IIRC the following will work
tell application "Finder"
mount volume "afp://machine_name/path"
end tell
Compile it into an application and add that to the login items
-
Sorry i forgot to grab the install disk on my way home this arvo if i remember I will test this tomorrow morning– TacticusJan 19, 2011 at 8:47
-
-
Ok this is rather odd. I've tested it at work and something must be different on our SOE as I don't get a window popping up with afp or cifs connections.– TacticusFeb 2, 2011 at 15:01
You just tick the "Hide"-button in the Start Objects-screen on System Preferences>Accounts, and it shouldn't show a Finder for it.
I was looking for the same answer and I found a cleaner way to do that using the automounter daemon.
In short you should create a /etc/fstab
file, (you does need root privileges to do that) and put this line into that file
(hostname):(share) (mount_point) url automounted,url==afp://(username):(password)@(hostname)/(share) (mount_point) 0 0
You should replace values between parentheses with your values and then you have to restart the automounter daemon with
$ sudo automount -vc
from Terminal.app. Alternatively you can reboot to activate new settings. If you did it in the shell way the previous command should respond with something like
~> sudo automount -vc
automount: /net updated
automount: /home updated
automount: /Volumes/Shared mounted <-- This line refers to the share I've mounted
automount: no unmounts
After that you should find your mounted folder in the Finder automatically.
Some references I found:
- http://rajeev.name/2007/11/22/autofs-goodness-in-apples-leopard-105-part-i/
- http://rajeev.name/2007/11/23/autofs-goodness-in-apples-leopard-105-part-ii/
- http://www.kristijan.org/2010/11/automount-afp-shares-in-osx/
P.S. If you're not a Terminal.app fan you can use this GUI app to automount filesystems, I haven't tried it because it's not free, but if you need that is pretty cheap.