Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
    
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 Oct 25 '11 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 Oct 25 '11 at 14:20
    
Looking how to configure mounts –  rubixibuc Oct 31 '11 at 8:18
add comment

1 Answer

up vote 7 down vote accepted

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.

share|improve this answer
    
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 Feb 20 '12 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 Feb 26 '12 at 23:14
    
I flagged it :-), I'll accept it as soon as I can –  rubixibuc Feb 27 '12 at 8:12
    
I'm looking into the merge for you... –  bmike Feb 27 '12 at 14:45
    
The merge is live @rubixibuc - you should be good to go. –  bmike Feb 27 '12 at 15:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.