Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Network Home Directories sharing

In previous versions of Mac OS X Server one could share network home directories (for use with network login accounts) via either AFP or NFS. Due to the way such shares are mounted by the client machine if you used AFP, then only the first network login from a client machine would work as the mount is then 'owned' by that user. This is why you could not use 'Fast User Switching' with network logins.


However NFS is mounted very differently and ends up looking not like a network share but part of the local file-system. In effect it is not owned by the user triggering the login and this means subsquent logins are not blocked. The contents of the path still have their normal permissions so you cannot access someone else's files.


Normally, AFP is fine however there are two scenarios that it is not. Firstly, if you are using either iRAPP Terminal Server, or AquaConnect Terminal Server. These allow multiple users to login and run applications on the Terminal Server. If you have the user home directories on the same server you are ok, if however you are using another server to shared those home directories as network home directories, then you would hit the AFP problem. Therefore AquaConnect specifically mention this in their manual and suggest using NFS instead.


Unfortunately, Lion Server now only allows setting up AFP for sharing network home directories - there are no other choices listed in the Server.app (Server Admin now has no file sharing options at all).


Note: It is still possible to run NFS on a Lion Server.


Even if you ensure NFS is running, and even if you manually setup sharing the users home directories you cannot set this up as an Open Directory auto-mount for home directories. This would therefore seem to make it impossible to use network home directories with a Terminal Server.


There is a second reason why using NFS rather than AFP has been very useful. Some applications are poorly written and do not work properly with AFP shared network home directories - Adobe are particularly bad. I found after switching to using NFS (to allow using a Terminal Server with Snow Leopard Server) that this had the unexpected but welcome side effect of allowing many of these misbehaving applications to work without errors.


So, does anyone know of a way to setup NFS shared network home directories in Lion Server? Obviously one could mix Lion and Snow Leopard servers but I am asking if this can be done with just Lion servers.

Posted on Jul 26, 2011 2:39 AM

Reply
20 replies

Aug 6, 2012 1:43 PM in response to John Lockwood

Hey John,


Were you ever able to find a way to configure OD to automatically mount the network home directory for a user that is stored on an NFS volume of an external server? I have found some dscl commands to set the home directory without using Apple's GUI utilities (ie WGM), but still cannot get NFS share to mount for the user at login.


If you have found any additional information or guidance I would be all ears.


Thanks

Aug 6, 2012 4:53 PM in response to NLSDAndy

Since the start of this thread, I have converted over to using NFS automounted home directories and have them working. Steps I followed:


1) export /Users in /etc/exports (using kerberos of security and to support simultaneous mounts of the same export by different users for fast-user-switching, not relevant for homedirs since this model mounts each user separately, but I have other NFS shares like /Groups that aren't user specific and I like following a consistent model).


/Users -sec=krb5 --alldirs


2) On the client, set up the auto_master to reference my map. In my case I'm using the mountpoint /mnt/Users for the users.


/mnt/Users auto_myhome -resvport,nolocks,locallocks,intr,soft,wsize=32768,rsize=3276,sec=krb5


3) On the client, set up my map file


cat /etc/auto_myhome

#

# Automounter map for /mnt/Users

#

+auto_home # Use directory service

#

# Get /home records synthesized from user records

#

* myserver.mydomain:/Users/&


4) On the client, make the /mnt mountpoint


5) On the server, edit the user records to point to the new homedirectory


Server->Users->CtrlClick/Advanced Options -> Home directory and set user to /mnt/Users/username


6) On server (if you support user logins on your actual server), symlink /mnt/Users to /Users so that the home directory will work there.



Note: some things didn't work right away when changing the home directory some processes seemed to cache the old one and complain, some even after a reboot (perhaps cached in preferences or something). But after a time trying to debug, all of a sudden it started working for one of my test accounts. Soon after all of them worked.


Been running this way since ML came out, used this as one of my ML "can I do it" tests. So far, so good.

Aug 7, 2012 6:09 AM in response to Omniver

Hi Omniver,


Thanks for the post - your solution sounds like you are only using one NFS NAS server, and one Lion Server. Is that correct?

I have 8 NFS servers all feeding shares and 12 Open Directory servers running Lion.



Do I need an auto_myhome record on each client for each server? Or maybe a different auto_home file for each server?

All my users are spread out over our 8 NASs (16 different NFS shares), how do I distinguish at logon which NAS and share should be mounted and used for the network home?



And do I need Kerberized NFS if I only plan to use as homedirs and don't need fast-user-switching?



We also run about 350 laptops with portable home directories, have you tested this NFS solution with portable home directories at all?


NFS homedirs seem like a great option if I can get it running for our large setup.

Dec 8, 2012 5:33 PM in response to Omniver

I've been running variations on this for two days and I'm stymied at the GUI login interface. Nothing I've tried allows GUI login (DO NOT comment out the HomeDirMechanism in /etc/authorization, per instructions by Alastair Houghton; it causes boot failure.) I've added a couple of tweaks from your instructions and we'll see if it adjusts over time.


In the mean time:


I'm curious what the user login paths look like from Workgroup Manager or Directory Utility. For some reason, Server is refusing to give me Advanced Options for network users, so I can't reference that.


What I am guessing is that the Advanced Options home directory changes the value NFSHomeDirectory (Directory Utility), which is consistent with some other source's instructions for mounting NFS directories. What happens to the value of HomeDirectory? In Workgroup Manger, this is the value that shows up as Home URL in the Home tab and is the full Home path in the Basic tab. This URL remains an AFP pointer, not an NFS pointer.


Any attempts to change this URL to NFS causes problems at GUI login with the authenticationhost, by way of HomeDirMechanism.


My question is: Does this AFP URL path cause any problems with the NFS home directory mount? Or is this a case where the afp layer is irrelevant and won't affect the nfs mount?

Jan 10, 2014 4:24 AM in response to Omniver

Thanks Omniver, excellent instructions by the looks of it, I'm looking forward to trying this out in a lab environment. Wonder if it can apply to a linux server and Active Directory LDAP? Anyway its good news that ML is accepting NFS automount home directories. Allbeit I'll probably get stuck on point 3) and what path to enter where you typed * myserver.mydomain:/Users/&.


So far in ML I have tried adding an NFS export and connecting on another 10.7 mac without succes. I may get two ML macs and once I have this sussed then think about having a Linux file share to support home directories.


Wonder if spotlight indexing works ok on NFS homes and things like Office data files?

Network Home Directories sharing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.