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: Get the Right Memory for Your Mac Top Quality, Competitive Price, Lifetime Backed Free Expert Support + Installation Videos too! MacBook & mini 8GB, iMac 16GB, Mac Pro up to 32GB. 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
Automount OS X Home Directories Using OpenLDAP and Linux
- 2009.09.28 - Tip Jar
Follow Low End Mac on Twitter.
Popularity: ![]()
![]()
![]()
Tweet this article. Short link: http://bit.ly/DYEii
Mac OS X comes with built-in integration to work seamlessly on a Mac Open Directory network or Microsoft Active Directory network. It is a fairly easy task to set it up to authenticate to a Unix/Linux OpenLDAP server. However, it is another matter to get it to read the home directory from OpenLDAP and mount it over NFS on a Linux server automatically.
The goal was to allow any valid network user to login to any Mac and have their home directory mounted from a Linux NFS file server. Getting to that goal required a series of baby steps and missteps. This article will take you through it as clearly as I can describe it. I found plenty of information on the Internet that covered bits and pieces - hopefully this will pull it all together for posterity.
Background Information
Before getting into the details of OpenLDAP, it is helpful to know how the Mac talks to Linux NFS servers and something about OS X AutoFS. For background information on connecting to Linux NFS servers, see Playing Nice with Linux NFS. And for additional background information on AutoFS, see Introduction to AutoFS in Mac OS X.
With the background stuff out of the way, we can focus on setting up OpenLDAP for Mac OS X clients. It turns out there is a little bit of work to do on both the OS X client and the Linux server.
Configuring OS X to Use OpenLDAP for Authentication
Open the Directory Utility in the Utilities folder, and add either the name or IP address of the OpenLDAP server.

Then, on the Services tab, enable LDAPv3 for the service type. Edit it and select "RFC 2307 Unix" under LDAP Mappings. This should be the default setting.
You should not have make any fine grained changes to the LDAP Mappings, but it is nice to be able to drill down and change some of the settings if you want to customize things later.
Configuring OpenLDAP for OS X clients
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol (LDAP) used to centralize authentication and authorization in a network. In the Unix world, it serves the same role as Open Directory (based on OpenLDAP) in a pure Mac network.
In Red Hat Enterprise Linux, OpenLDAP runs as a service and is configured with files in the /etc/openldap directory.
To support OS X clients, the OpenLDAP schema needs to be extended by adding two lines to the /etc/openldap/slapd.conf file. The lines are added near the top of the file after the other include directives.
include /etc/openldap/schema/samba.schema
include /etc/openldap/schema/apple.schema
The samba.schema file is part of the Samba project and
can be downloaded as part of the Samba source code. You can get the
apple.schema directly from your Mac after installing the
system tools. On my system, the Mac file was found in
/private/etc/openldap/schema/apple.schema.
Copy each plain text file to the the /etc/openldap/schema directory
on the Linux server. There were one or two attributes in the
apple.schema file I had to uncomment. After installing the
new schemas, restart OpenLDAP.
Adding Automap Records to OpenLDAP
With the Apple schema installed, automount map records can be added to the OpenLDAP directory that OS X will use to mount remote home directories for network users.
The version of OpenLDAP I used on Red Hat Enterprise Linux 5 did not have any automountMap objects defined. So I firstcreated two automountMap objects, one for auto_master and one for auto_home. These names will make sense if you read the background information on AutoFS. Here are the LDIF definitions for those objects:
dn: automountMapName=auto_master,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto_master
dn: automountMapName=auto_home,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto_home
Next, I created an auto_master record that tells OS X to look at the auto_home map to find out where the home directories live:
dn: automountKey=/home,automountMapName=auto_master,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: /home
automountInformation: auto_home
Finally, I created the auto_home record with the NFS server name and a wildcard entry for the home directory:
dn: automountKey=*,automountMapName=auto_home,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: *
automountInformation: -fstype=nfs myserver.example.com:/home/&
With the automount records in LDAP, OS X clients that are configured with the OpenLDAP server will try to mount the home directories of network users on myserver.example.com.
When the home directory is successfully mounted, it is fully
integrated with the OS X desktop. The home directory gets mounted
locally at /home instead of /Users, and files in the remote
/home/user/Desktop directory appear on the Mac desktop..
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
- Introduction to Autofs in Mac OS X, 07.01. "Autofs is often used in enterprise environments to set up network-based home directories and other network mounts for users at login."
- 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 G5 Quad, Oct. 2005 - With two 2.5 GHz dual-core G5 CPUs, the G5 Quad was the most powerful PowerPC Mac ever and introduced PCI Express.
- Group of the Day: Mac Network deals with all aspects of Mac networking.
- November 21 in LEM history: 00: OS upgrades, downgrades - AltiVec vs. Pentium III - 01: Saved by the clones - Computer of the future - 02: Apple Education: Let's get to it - 03: Panther lets Macs and PCs work together, - Lombard SCSI bug - 05: 3 survivors from the 1970s - Real world battery life inadequate - Windows to Mac file transfer with Zip disks - $99 alternative to Microsoft Office - 06: Parallels 1.0 far more polished than beta
- Support Low End Mac
Recent Content on Low End Mac
- Apple's Tablet an End Run Beyond Netbooks, Frank Fox, Stop the Noiz, 11.20. Whatever Apple has planned will leverage existing technologies while going beyond what its competitors can offer.
- NASA Chemical Sensor for iPhone, Smartphone Death Match, iPhone Earrings, and More, Ian R Campbell, 11.20. Also mobile phone dangers, new apps, GPS solution for iPod touch, new iPod and iPhone cases, and more.
- Apple #4 in Reliability, Apple Tablet a Gadget for All?, HP's i7 Notebook Outdoes Mac Rivals, and More, The 'Book Review, 11.20. Also Flash 10.1 improves video on Hackintosh netbooks, thin-and-light notebooks impress, Windows XP finally on the way out, and more.
- i5 iMac Benchmarked, Mac mini 'Shouldn't Be Overlooked', Twitter Client for Classic Mac OS, and More, Mac News Review, 11.20. Also why Apple leaves the low end to others, 10.6.2 fixes video playback problem in 27" iMac, 3D Leopard and Snow Leopard performance, and more.
- Replacing the Hard Drive in a Clamshell iBook, John Hatchett, Recycled Computing, 11.19. Yes, it is one of the most difficult Apple notebooks to disassemble and reassemble, but a 10 GB hard drive just will not do.
- IBM Model F: A Great Old Keyboard with an Outdated Layout, Tommy Thomas, Welcome to Macintosh, 11.19. Although it used a different technology than the revered IBM Model M keyboard, the Model F was a great keyboard in its own right.
- Soft Touch Keyboards, Wireless Mouse Options, Loving SeaMonkey 2, and More, Charles W. Moore, Miscellaneous Ramblings, 11.18. Also the future of browsing with PowerPC Macs and the multiple mouse input bug introduced with OS X 10.5.8.
- More links in our archive.
Recent Deals
- Best eMac Deals, 11.18. Used 1 GHz Combo, $100; SuperDrive, $269; 1.25 GHz Combo, $119; SD, $319; 1.42 GHz Combo, $289; SD, $498.
- Best Mac OS X 10.6 and Mac Box Set Deals, 11.18. "Snow Leopard", single user, $25; 5 users, $45; Mac Box Set, single user, $139; 5 users, $180; Server, $414. Shipping included.
- Best Xserve Deals, 11.18. Used 1 GHz dual G4, $649; 2.3 dual G5, $795; 3.0 4-core Xeon, $1,899; refurb 2.26 4-core, $2,499; new, $2,888; refurb 8-core, $2,999; new, $3,449; more.
- Best 15" MacBook Pro Deals, 11.17. Used 1.83 GHz, $750; 2.16, $800; 2.33, $900; refurb 2.4, $1,299; 2.53, $1,449; 2.66, $1,699; 2.8, $1,899; new 2.53, $1,579; 2.66, $1,799; more.
- Best Power Mac G4 and AGP Video Card Deals, 11.17. Used 400 MHz, $50; 933 MHz, $80; 500 dual, $60; 867 dual, $90; 1 GHz dual, $150; 1.25 GHz dual, $225; 1.42 GHz, $499.
- Best Mac OS X 10.5 Deals, 11.17. "Leopard" upgrade, $80; single user license, $135; 5 users, $173; Mac Box Set, 5 users, $230; Server, 10 users, $340; unlimited, $850. Shipping included.
- Best Mac mini Deals, 11.16. Used 1.42 GHz G4 mini, $379; 1.66 GHz Core Solo, $419; 2.0 Core 2, $450; new 2.26 GHz nVidia, $580; 2.53 GHz, $769; Server, $990.
- Best iBook G4 Deals, 11.16. Used 12" 1.07 GHz Combo, $210; 1.33 GHz, $298; 14" 1.33 GHz, $398; 1.42 GHz, $479; SuperDrive, $498.
- Best iPod shuffle Deals, 11.16. Used 1 GB, $35; 4 GB, $65; refurb 1 GB, $39; 2 GB, $59; new 2 GB, $55, 4 GB, $75. New and refurb prices include shipping.
- 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
