Easy AFP Automount on OS X 10.5

I have been working on the home network in an effort to attain seamless integration with the Macs. I use a ReadyNAS NV+ with 4x 500GB drives as the network backup/media/storage device. Media sharing is done via a Mac mini to the Xbox 360, Squeezebox and the Mac laptops. When I was running on Tiger I configured automount AFP shares using the NetInfo Manager application. Well, as of the upgrade to Leopard, this application is gone.

I was digging around a bit this morning on how to go about a proper automount under Leopard. I wasn’t interested in any sort of kludgey AppleScript that would be setup as some sort of login or startup item. AppleScript will work of course but it wasn’t good enough, this *is* UNIX right? A couple of queries into Google and I found a great blog article detailing autofs in Leopard. There are lots of different options, but I was primarily concerned with AFP automounts. This is detailed in part two of the referenced article.

Here is what I ended up with and it works great, as of 10.5.1 that is. I dropped the net option as I wanted a more direct way to access the mounts from the Finder. I created /etc/fstab and added the following.

7 Responses to “Easy AFP Automount on OS X 10.5”

  1. Allan H Says:

    Hi, and thanx for the post. Heres the deal..scripts are completly new to me. I too wish my laptop to automount all the drives between each other. I have 1 10.5 mini with and external 1 gig attached firewire, a MacBook Pro, a Powerbook, a G4 Pro and the 1st mac mini upstairs.
    Now , dont get me wrong, i understand all the standard "mouse-clicked-settings"…really in depth, however im irritated by the fact that i cannot assign my computers to automatically mount all the shared drives on the desktop upon logging in and (ofc) Preferably Afer they find the network ofc.
    How do I do this? I know its possible but how ?
    Ive never written a script in my life..but im ready to if it means i can enjoy the above…. any advice for a guy like me ?
    TY in advance for all your time
    Al.

  2. Allan H. again Says:

    erhm ok i found something ..and funny enough the guz asking all the questions sounds like i would have in the next few days…so to spare your time : http://www.macfixitforums.com/php/showflat.php?Board=tiger&Number=730956
    🙂
    thanx though…hope this helps someone else from the "department of the department…like me" (youll get that after u dive into the link.
    take care
    al

  3. Mark Blooman Says:

    You can also go into system prefs, accounts, log in items and add the mounted drive to the list – et voila!

  4. Mark Blooman Says:

    You can also auto start a mounted drive by adding it to the sys prefs/account/log in items.
    Works well on start up.

  5. Jay Levitt Says:

    Not so easy, sadly.. when I do this, half the time, automount mis-creates the directory:
    # ls -l /Volumes
    dr-xr-xr-x 2 root wheel 1B Oct 12 17:23 mymount/
    compared to this, when mounted by Finder:
    drwx——@ 27 jay staff 874B Oct 12 17:31 mymount/
    I tried Mark’s Login Items trick, but that opens the window at login, which I do NOT want – even if I click hide. Argh. Any workarounds?

  6. Mike Says:

    What if you don’t want to use a specific user and password in the afp:// url?
    If I specify nothing i get an error code -43. If i use the ReadyNAS FrontView admin:netgear1 account it works.
    Ideally i’d like to just use the Guest account, but I cannot find any information on how to specify the guest account in the afp:// url format.
    Ideas?

  7. Matt Woodruff Says:

    Does anyone know if this works without logging in? I have a xServe that is located in a datacenter offsite and I don’t want the user to log in, but instead the automount work in the background to load the AFP share. (This works with Directory Access and loading a NFS mount, but NFS is not recommended for mailstores) So that basically after reboot and before the User logs in it loads the AFP mount?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s