0

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.

user65712
  • 387
  • 1
  • 8
  • 17

3 Answers3

2

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

Tacticus
  • 351
  • 1
  • 7
  • Sorry i forgot to grab the install disk on my way home this arvo if i remember I will test this tomorrow morning – Tacticus Jan 19 '11 at 08:47
  • That script seems to open Finder as well. – user65712 Jan 21 '11 at 18:43
  • 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. – Tacticus Feb 02 '11 at 15:01
0

You just tick the "Hide"-button in the Start Objects-screen on System Preferences>Accounts, and it shouldn't show a Finder for it.

Niclas Lindqvist
  • 189
  • 1
  • 10
0

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:

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.

Fabio
  • 1,299
  • 2
  • 13
  • 18