Low End Mac Reader Specials
TypeStyler For Mac OS X is Now Shipping! Download The Free Fully Functional 60 Day Tryout at www.typestyler.com
OWC: We Make DIY Upgrading Easy! Maximize your Apple MacBook / MacBook Pro. Up to 8.0GB Memory, up to 1.0TB HD & More. Easy Guide + Free, Detailed Installation Videos. Click here
Don't install Parallels to play poker online! Poker Mac will show you how
to download and install a native Mac poker application such as Full
Tilt Poker Mac.
Laptop Hardware Provided by TechRestore - Overnight Mac & iPod Repairs.
Compare products like desktop computers, apple laptops, apple macs, and LCD Monitors side by side! All the information and reviews to make the best purchasing decision for new mobile phones, sat nav systems, or MP3 players. The Ciao online shopping community makes searching products easy for you.
Linux to Mac
Introduction to Autofs in Mac OS X
- 2009.07.01 - Tip Jar
Popularity: ![]()
![]()
![]()
![]()
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.
OS X auto_master and auto_home
The /etc/auto_master file controls the auto-mounted Network File System (NFS) file systems. If you are going to mount NFS volumes from a Linux server, there is one gotcha that I covered in an earlier blog post.
The auto_master defines all "maps" which are collections of automounts related by mount point and organized in one file (or directory service entry). Here is what the default file looks like on my Mac:
# # Automounter master map # +auto_master # Use directory service /net -hosts -nobrowse,nosuid /home auto_home -nobrowse /Network/Servers -fstab /- -static
The plus (+) sign in front of the auto_master entry tells OS X to look in the directory service (Open Directory, LDAP, etc.) for an automount record and use it if found.
Notice the /home entry is set to auto_home, and because it is not a full path, it is assumed to be /etc/auto_home. It is an example of an indirect map. The mount point in the local directory is defined, but the remote mounts are defined in the /etc/auto_home map file. Network users who login to the local machine will have their home directories mounted in /home according to the details in /etc/auto_home.
Here is the default /etc/auto_home file:
# # Automounter map for /home # +auto_home # Use directory service
Once again, we see the plus sign telling OS X to look for an auto_home record in the directory service. No further details are defined.
The last two lines in auto_master handle NFS mounts defined in the /etc/fstab file, the common file system mount table in Linux and other Unix flavors. The /etc/fstab file is deprecated in OS X and not recommended.
Applying changes to autofs
The automount process will not detect changes made to auto_master or other map files unless you tell it. This command tells the process to read all map files again:
sudo automount -vc
Autofs wildcards
Wildcards can be used in mount map files to allow directory substitution. For example, if you had this defined in auto_master:
/opt auto_public
And this defined in /etc/auto_public:
* nfs.mydomain.com:/public/&
Then, when /opt/bin was accessed, nfs.mydomain.com:/public/bin would be mounted on /opt/bin. The same would apply for any subdirectory accessed under /opt.
Other Map Types
OS X autofs supports direct maps, where the local mount points are defined inside the mount map file, and indirect maps, where the local mount point is defined in auto_master. The wildcard example above is an indirect map. There are also executable maps where the mount map file is actually an executable shell script that returns the names of the mount points within the trigger folder. Exploring executable maps is left as an exercise for the reader. Finally, you can define static maps in /etc/fstab or in the Directory Utility Mounts tab.
Other file system types
All of the examples shown use the NFS file system. OS X autofs can also handle Apple File System (AFP) and Microsoft Server Message Block (SMB) file systems.
To use these file systems, add the -fstype=afp and
-fstype=smbfs options when defining the remote mount points.
(Note: You cannot use smbfs for remote home directories unless you are
using the Microsoft Active Directory service plugin.)
Keith Winston is a recent Mac convert after five years of Linux on the desktop. He also writes for Linux.com and created CommandLineMac to focus on the Unix-y power of the Mac. If you find Keith's articles helpful, please consider making a donation to his tip jar.
Recent Linux to Mac Columns
- Automount OS X Home Directories Using OpenLDAP and Linux, 09.28. It's possible to get an OS X Mac to automatically mount a Linux server using OpenLDAP. The tricky part is finding all the steps needed to make it work.
- Automating FTP on the Mac, 03.04. There's no shortage of GUI FTP programs, but using the Terminal gives you tools to automate file transfer sessions.
- An RSS News Reader with the Power of Google, 08.20. Unlike browser-based RSS readers or dedicated news reader apps, Google Reader lets you access your favorite feeds from any computer and browser.
- 3 reasons to run virtualized Linux, 05.22. Reasons to run Linux under virtualization include duplicating your development environment, X11 programs that don't work well in OS X, and exploring different GUI concepts.
- More in the Linux to Mac index.
Links for the Day
- Mac of the Day: Power Mac 4400, Nov. 1996 - Apple does cheap to compete with clones - and nobody is impressed.
- Group of the Day: Puma List is for anyone using Mac OS X 10.1.
- November 7 in LEM history: 00: PowerBook Lite dreams - Our first Macs - 01: OS 9, OS X, or Linux? - 02: Xserve for the classroom - 03: Panther on slot-loading iMacs - High capacity Lombard/Pismo battery - 05: Clean keyboard residue from laptop screen with ROR - SeaMonkey - 06: Dan Bricklin, inventor of the spreadsheet - Turn any Mac into a gameshow buzzer - 07: The transforming PowerBook 1400 - PowerBook 540 on Compact Flash
- Support Low End Mac
Recent Content on Low End Mac
- Quad-Core CPU Makes Sense in MacBook Pro, OS X 10.6 Causing Overheating, Overseas Power, and More, The 'Book Review, 11.06. Also Late 2009 MacBook reviewed, how to add RAM to new MacBook, 18.4in Acer notebook used Intel i7, and SanDisk SSD chosen for Sony VAIO X.
- Dumping Macs for Google Apps, SSD in iMac, Late 2009 iMac Performance Problems, and More, Mac News Review, 11.06. /newsrev/09mnr/1106.html
- WiFi Paranoia, iMac-O-Lantern, Magic Mouse Does Click, Free Clipboard Managers, and More, Charles W. Moore, Miscellaneous Ramblings, 11.05. Also strange time stamps, problem with ColorIt on Intel Mac, and the story behind OS X 10.5.4 install discs.
- IDE Is Dead; Long Live SATA!, Dan Knight, Mac Musings, 11.04. SATA has displaced parallel ATA. While IDE hard drives haven't disappeared, the best deals are in SATA hard drives.
- QuickTime X in Snow Leopard Imports, Trims, and Publishes Video Quickly and Easily, Alan Zisman, Zis Mac, 11.04. The long, slow process of importing video into iMovie to edit it, then render it to another format, is history as QuickTime X does that much more quickly.
- More links in our archive.
Recent Deals
- Best Mac Pro Deals, 11.03. Used 2.66 GHz 4-core, $1,300; 3.0 8-core. $2,299; refurb 2.66 4-core Nehalem, $2,149; 2.93, $2,549; 2.26 8-core, $2,799; 2.93, $4,999.
- Best iPhone Deals, 11.03. New 8 GB iPhone 3G, $$99; refurb 16 GB 3GS, $149; new, $199; 32 GB, $299.
- Best 12" PowerBook G4 Deals, 11.03. Used 867 MHz SperDrive, $348; 1 GHz, $499; 1.33 Combo, $298; SD, $559; 1.5 Combo, $448; SuperDrive, $589.
- Best Power Mac G3 and PCI Video Card Deals, 11.02. Used beige 300 MHz, $25; G4/366, $49; blue & white 350, $80; 400, $90; 450, $105; PCI video cards from $15; shipping additional.
- Best Power Mac G4 and AGP Video Card Deals, 11.02. Used 400 MHz, $50; 733 MHz, $69; 933 MHz, $209; 1.25 GHz dual, $299.
- Best 15" MacBook Pro Deals, 11.02. Used 2.0 GHz, $800; 2.2, $900; 2.4, $1,000; refurb 2.53, $1,449; 2.66, $1,699; 2.8, $1,949; 3.06, $2,169; new 2.53, $1,579; 2.66, $1,799; more.
- Best Mac mini Deals, 10.30. Used 1.33 GHz G4 mini, $379; 1.42, $389; 1.5, $419; 1.83 GHz Core Duo, $350; Core 2, $439; new 2.26 GHz nVidia, $580; 2.53 GHz, $770; Server, $990.
- Best G4 iBook Deals, 10.30. Used 12" 1.07 GHz Combo, $225; 1.33 GHz, $298; 14" 1 GHz, $349; 1.33 GHz, $398; 1.42 GHz SuperDrive, $498.
- Best Classic Mac OS Deals, 10.30. System 6.0.8 floppies, $10; 7.1, $12; 7.5, $20; 7.5 CD, $4; 7.6 $13; 8.1, $11; 8.5, $20; 8.6, $90; 9.0, $20; 9.2.2, $30.
- More deals in our archive.
About LEM | Support | Usage | Privacy | Contacts
Navigation
Used Mac Dealers
Apple History
Video Cards
Email Lists
Favorite Sites
MacSurfer
MacMinute
MacInTouch
MyAppleMenu
InfoMac
Macs Only!
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac
Museum
DealMac
DealsOnTheWeb
Mac2Sell
ramseeker
Mac Driver Museum
JAG's House
System
6 Heaven
System 7 Today
the pickle's Low-End
Mac FAQ
Abandonware
Petition
Mac vs. PC Info
Affiliates
The Apple
Store
Mac
Connection
B&H
MacMall
TechRestore
ExperCom
Crucial
Memory
batteries.com
Advertise
MacMinute
MacInTouch
MyAppleMenu
InfoMac
Macs Only!
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac
Museum
DealMac
DealsOnTheWeb
Mac2Sell
ramseeker
Mac Driver Museum
JAG's House
System 6 Heaven
System 7 Today
the pickle's Low-End
Mac FAQ
Abandonware
Petition
Mac vs. PC Info
Mac Connection
B&H
MacMall
TechRestore
ExperCom
Crucial Memory
batteries.com
