9

Checking Directory Services for network file system mounts, i.e.

sudo dscl . -list /Mounts

and

sudo dscl . -readall /Mounts

returns nothing, yet the /etc/fstab file is deprecated in Lion. Why is dscl returning nothing and where are the mounts defined if they aren’t by Directory Services?

3
  • Good question – from what I gather from this blog post (German), auto mounts in Lion need to be defined via references in the AutoMounter master table, /etc/auto_master.
    – kopischke
    Commented Oct 25, 2011 at 10:30
  • Launchd controls the boot process for several versions of Mac OS X. The Mounts part of directory services is empty by default. Are you looking to make new mounts or figure out how Lion is booting?
    – bmike
    Commented Oct 25, 2011 at 14:20
  • Looking how to configure mounts
    – rubixibuc
    Commented Oct 31, 2011 at 8:18

1 Answer 1

7

OS X uses the Autofs stack to mount network file systems. Keith Winston has a good introduction to Autofs on OS X stating that:

OS X uses an autofs code stack based on Sun's Solaris version of Unix. Many of the advanced features are not documented very well, and this can be an issue unless you are familiar with Solaris. I was not and had to do quite a bit of digging.

Autofs is often used in enterprise environments to set up network-based home directories and other network mounts for users at login. It can also dynamically mount network shares on access.

By default, Autofs mounts network files systems defined via Directory Services, those defined in /etc/fstab and NFS file systems, all accordingly to its master table, /etc/auto_master.

Your call to dscl returns nothing because no mounts have been defined in Directory Services (no surprise there). If you want to define mount points not covered by Autofs default configuration without resorting to Directory Services or the deprecated /etc/fstab, you will have to add a mapping (via a auto_* file) to auto_master. For the technical background, refer to the post linked above; there is a good “how to” add auto mounts for SMB mounts in this Mac OS X Hints post.

5
  • I don't know how it had me under this account, the first time I posted here it just asked for my name. I would love to accept this answer, how do I access an account just by username?
    – rubixibuc
    Commented Feb 20, 2012 at 5:10
  • @rubixibuc:according to the Meta answer most closely related to the question I could find, you’ll have to flag the question for moderator attention and ask or the accounts to be merged.
    – kopischke
    Commented Feb 26, 2012 at 23:14
  • I flagged it :-), I'll accept it as soon as I can
    – rubixibuc
    Commented Feb 27, 2012 at 8:12
  • I'm looking into the merge for you...
    – bmike
    Commented Feb 27, 2012 at 14:45
  • The merge is live @rubixibuc - you should be good to go.
    – bmike
    Commented Feb 27, 2012 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .