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
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: 'WallStreet' PowerBook G3, May 1998 - WallStreet offered 3 screen sizes and CPU speeds from 233 to 292 MHz.
- Group of the Day: Mac UK is for Mac users in the United Kingdom.
- February 9 in LEM history: 00: Think choices - Promoting the Macintosh - 01: Apple vs. Mac clones - 05: Apple and the $100 laptop - Yojimbo - Core Duo vs. G5 - 07: The story behind After Dark - Microsoft Office 2007
- Support Low End Mac
Recent Content on Low End Mac
- Do We Really Need Another Mac Email Client?, Charles W. Moore, Miscellaneous Ramblings, 02.08. Mac users have a host of free and low-cost email clients to choose from. Does Brent Simmons' 'Letters' project make any sense at all?
- MacBook Pro a Revelation, Dan Knight, Mac Musings, 02.08. After using G4 Macs for over a decade, spending a weekend prepping a first generation MacBook Pro was a real eye opener.
- 42 Reasons a Netbooks Is Better than an iPad, Hard Drive Upgrade Value, Faster Netbooks, and More, The 'Book Review, 02.05. Also why the iPad can't compete with netbooks, 802.11n WiFi card for older Intel MacBooks and Mac minis, and a DJ keyboard cover for MacBooks.
- iPad Perfect for Handheld Computing, John Hatchett, Recycled Computing, 02.05. You can hold the iPad in one hand and operate it with the other, giving it real advantages over a laptop computer.
- iPad Targets Netbook Users, iPad 'Flaws' Don't Matter, In-page Search for iPhone Safari, and More, iNews Review, 02.05. Also FSF considers iPad 'iBad' for freedom, Touch Mouse app turns iPhone into wireless keyboard and trackpad, privacy screen for iPhone, and more.
- Touch Shifts the Apple Empire, Tim Nash, Taking Back the Market, 02.05. Apple dominates mobile computing, and it will be difficult for competitors to match the value of the iPad.
- 90% of Premium PCs Are Macs, OS and Browser Market Share, Chrome Browser to Dominate, and More, Mac News Review, 02.05. Also 27" iMac too popular for supply, eco-friendly 2 TB hard drive, Puppy Linux for PowerPC Macs, 6-core Mac Pro rumored, and more.
- iPad Should Support a Stylus, CoolBook Quiets MacBooks, Puppy Linux for PowerPC Macs, and More, Charles W. Moore, Miscellaneous Ramblings, 02.03. Also the iPad as a genie in a bottle, Eudora Classic 6.2, notebook battery life, and more uses for 'obsolete' technology.
- More links in our archive.
Recent Deals
- Best 15" MacBook Pro Deals, 02.02. Used 2 GHz, $700; 2.4, $999; refurb 2.53, $1,449; 2.8, $1,699; 3.06, $2,199; new 2.53, $1,610; 2.66, $1,839; 2.8, $2,109; 3.06, $2,550; more.
- Best G3 iMac Deals, 02.02. 500 MHz CD-ROM, $40; 450 MHz DVD-ROM, $60; 600 MHz CD-ROM, $230 shipped; 700 MHz CD-RW, $300 shipped.
- Best eMac Deals, 02.02. 1 GHz SuperDrive, $269; 1.25 Combo, $100; SD, $360; 1.42 GHz Combo, $299; SD, $439.
- Best Mac mini Deals, 02.01. Used 1.25 GHz G4 Combo, $369; 1.5, $399; Core Solo, $399; 1.83 GHz Core Duo SD, $439; new 2.26 GHz nVidia, $580; 2.53 GHz, $759; Server, $985.
- Best iBook G4 Deals, 02.01. 12" 1.07 GHz Combo, $200; 1.33 GHz, $259; 14" 1.42 GHz SuperDrive, $399.
- Best Titanium PowerBook G4 Deals, 02.01. 800 MHz Combo, $285; 867 MHz SuperDrive, $400; 1 GHz Combo, $549.
- Best 13" MacBook & MacBook Pro Deals, 01.29. Used 1.83 GHz, $570; 2.0, $599; 2.4 GHz, $800; 2.26 MB, $849; new, $925 after rebate; Pro, $1,108, 2.53, $1,399 a/r.
- Best Power Mac G5 Deals, 01.29. 1.8 GHz single, $399; dual, $479; 2.0, $549; 2.5, $609; 2.7, $799; 2.3 GHz dual-core, $709; 2.5 GHz Quad, $939.
- Best Mac OS X 10.0-10.3 Deals, 01.29. Mac OS X 10.0, $30; 10.1, $20; 10.2, $50; 10.3, $50; 10.3 Server, unlimited users, $130.
- 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
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
