Skip to content

Instantly share code, notes, and snippets.

@channingwalton
Last active September 20, 2017 22:11
Show Gist options
  • Save channingwalton/7654945 to your computer and use it in GitHub Desktop.
Save channingwalton/7654945 to your computer and use it in GitHub Desktop.
Automounting in OSX Maverick

What Changed

I used to automount on OSX by sudo vifs and adding a line like vault.local:/backup /Volumes/backup url auto,url==afp://;AUTH=No%20User%[email protected]/backup 0 0. But that no longer works on Maverick because the system deletes everything in /Volumes on wake/restart/something-or-other.

We are going to create a mount at /mnt/Resources. We need to edit the auto_master to tell it where the automount config for /mnt/Resources lives:

sudo vi /etc/auto_master

Now add this line at the top

 /mnt/Resources          auto_resources

Mine looks like this now:

#
# Automounter master map
#
/mnt/Resources          auto_resources
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,hidefromfinder,nosuid
/home                   auto_home       -nobrowse,hidefromfinder
/Network/Servers        -fstab
/-                      -static

Now create auto_resources, which is what OSX will look for because you told it to in auto_master

sudo vi /etc/auto_resources

add lines for each mount you would like. I wanted a backup so I added:

backup afp://;AUTH=No%20User%[email protected]/backup

Restart the daemons of mounting:

sudo automount -vc

Now your mount will appear under /mnt/Resources.

See Also

  1. man automount
  2. a Helpful blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment