ovig

Q: Portable Home Directory no longer works on Lion bound to Active DirectoryAD

Hi, All,

 

I look after about 30 MacBook Air/Pro connected to a predominantly Windows corporate network.

 

A few months back, I installed a MacOS Server running OpenDirectory and Software Update Services for managing the MacBooks - they are configured in the standard "magic triangle" configuration, bound both to the Active Directory (running on a handfull of Windows 2003-R2 servers) and OpenDirectory; they are configured to use the Mac Server for Software Updates, and with Portable Home Directories replicated on a network share point (through AFP) to keep a backup of the user's data.

 

When all the MacBooks were running Snow Leopard, everything was running fine... but the last couple of laptops purchased came with Lion and they cannot synchronise their PHD's anymore :-(

 

I have spent a lot of time trying to pin-point the problem, including replicating a whole test-network with its own AD/OD and client Snow-Leopard/Lion laptops to try various configurations... my conclusions so far are that:

 

1- using Snow Leopard clients, it just works

 

2- using a Lion client, when the network user account is configured in the default Users O.U. on Active Directory, it just works

 

3- using a Lion client, when the network user account is configured in another O.U. than Users (e.g. Company-Name or External-Contractors), then the PHD syncinc doesn't work at all

 

4- the failure symptoms are a popup window when trying to do a manual sync saying that "your network home at (null) does not allow writing" - if automatic syncing is configured through MCX, it just fails silently

 

5- when PHD syncing fails, I can log on using the network account, manually mount the share point used for the network home in the Finder and read and write to it without a problem; so it' not a permission problem, but the fact that the network home directory is (null)

 

6- I have traced the root cause to the FileSyncAgent process which raises an exception at startup - here's what I see as the salient lines from the logfile (i've edited out the username):

0:: [12/02/07 12:45:00.512] ******************************************************************************

0:: [12/02/07 12:45:00.512] FileSyncAgent-502.2 (r?, BUILT:?, PID:385, OS:11D50b, ARCH:x86_64-64) starting

0:: [12/02/07 12:45:00.512] LA: FileSyncAgent -launchedByLaunchd -iDiskPlist

0:: [12/02/07 12:45:00.512] ******************************************************************************

0:: [12/02/07 12:45:00.512] Engineering log verbosity level = 1

1:: [12/02/07 12:45:00.512] Registered isRunning port with name 'com.apple.FileSyncAgent.iDisk.isRunning'

1:: [12/02/07 12:45:00.846] Temporary disk storage at "/Users/[USERNAME]/Library/Caches/Cleanup At Startup/FileSyncAgent-1727909307".

1:: [12/02/07 12:45:00.846] UserAgentString = "DotMacKit-like, File-Sync-Direct/502.2.? (11D50b x86_64-64)"

1:: [12/02/07 12:45:03.249] +[SSyncSet_PHD createPHDSyncSetForLocalPath:remoteHomeSpec:mountSuffixPath:name:]: Creating Sync Set with name "HomeSync_Mirror".

1:: [12/02/07 12:45:03.249] -[SSyncSet_PHD _setupNewPHDSyncSetWithLocalPath:homeSpec:mountSuffixPath:]: We've been given local home path '/Users/[USERNAME]'.

1:: [12/02/07 12:45:03.249] -[SSyncSet_PHD _setupNewPHDSyncSetWithLocalPath:homeSpec:mountSuffixPath:]: local home at "/Users/[USERNAME]"

<PHD> 1:: [12/02/07 12:45:06.458] Added new sync set "HomeSync_Mirror".

<PHD> 1:: [12/02/07 12:45:06.465] _incomingIPC: SFCreatePHDSyncSetMsgId (17) took 3.217627 seconds.

<PHD> 1:: [12/02/07 12:45:06.526] Scheduling next sync of "HomeSync_Mirror" at 2012-02-07 12:45:16 +0000

<PHD> 1:: [12/02/07 12:45:18.122] ==========================================================

<PHD> 0:: [12/02/07 12:45:18.123] Starting automatic sync of "HomeSync_Mirror".

<PHD> 1:: [12/02/07 12:45:18.126] Peer "local" reports changes since last sync.

<PHD> 0:: [12/02/07 12:45:18.128] EXCEPTION: NilPtr <-[SPeer_FS_PHD mountPeerVolume] (Peer-FS-PHD.m:142): "'((homePath))' is nil">

<PHD> 0:: [12/02/07 12:45:18.128] BACKTRACE: {

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x105003493  

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x104f70866  

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x104f6fabd  

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x104f6ecb4  

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x7fff924bb74e

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x7fff924bb6c6

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x7fff901998bf

<PHD> 0:: [12/02/07 12:45:18.128] ? | 0x7fff9019cb75

<PHD> 0:: [12/02/07 12:45:18.128] }

 

7- if I use the same user account from a Snow-Leopard client, the mountPeerVolume finds the remote home_dir, mounts it and happilly trawls through the two directories to figure out what needs to be copied; I get something along the lines of:

0:: [12/02/08 18:44:15.344] Starting manual sync of "HomeSync_Mirror".
1:: [12/02/08 18:44:15.363] -[SPeer_FS_PHD mountPeerVolume]: We've been given remote home path "/Volumes/[USERNAME]".
1:: [12/02/08 18:44:15.363] -[SPeer_FS_PHD mountPeerVolume]: Remote home path exists.
1:: [12/02/08 18:44:15.363] -[SPeer_FS_PHD mountPeerVolume]: Final path to PHD remote home root = "/Volumes[USERNAME]"

 

8- if I use a Lion client and a user account configured in the Users O.U. on Active Directory, it works similarly well

 

9- in the failing use-case, if I run a "dscl xxx -read /Users/xxx" to verify that the DirectoryServices deamon returns some information, all looks good: I get all my A.D. user details, including email config and network home_directory, the MCX payload, etc

 

10- the only difference that I can see when running dscl between the "working use-case" and the "failing use-case" is that the Attribute for the network home directory is called HomeDirectory (working) or OriginalHomeDirectory (failing) - but the actual value is present and correct in both cases

 

11- I have enabled SMB as well as AFP file sharing to ensure that it's not a protocol problem rather than the share point itself that causes problem - no difference

 

12- I have upgraded the MacOS Server to 10.7.3 (from 10.7.2) - no difference

 

13- I have upgraded the Lion client from 10.7.2 to 10.7.3 - no difference

 

14- I have tried to manually configure the Directory Search path on the Lion client to map HomeDirectory to OriginalHomeDirectory - either the mapping didn't work or it's not the real cause of the problem, as again: no difference.

 

15- I have contacted AppleCare, raised a case with all the details above, been escalated from level 1 to 2 and 3 - and basically have been told that customers have reported very similar problems & that no more detail is available to me as it is a Directory Services related problem - if I want to take it further with Apple, I need Enterprise OS Support (and hence $1000s per year - and no real guarantee of result)

 

[thanks to anyone who's read until now]...

 

So my questions are (as I can't believe that I'm the only one using "proper O.U.'s" for managing users in Active Directory):

- has anyone experienced this before?

- does someone know of a workaround (other than "stick to SnowLeo" or "redesign your whole A.D."!)?

- can someone help me figure out where the FileSyncAgent process tries to get its remote home directory from - as this might point to a solution?

 

Many thanks

MacBook Pro (15-inch Early 2008), Mac OS X (10.6.8)

Posted on Feb 17, 2012 5:52 AM

Close

Q: Portable Home Directory no longer works on Lion bound to Active DirectoryAD

  • All replies
  • Helpful answers

  • by RayfromMD,

    RayfromMD RayfromMD Jun 7, 2012 8:04 AM in response to ovig
    Level 1 (0 points)
    Jun 7, 2012 8:04 AM in response to ovig

    I am using 10.6 Server and having the same issue with a Lion client.

     

    One of my users just started getting the same error on 5/29/12. He was able to homesync prior to 5/29. I have another user who is also on Lion 10.7.4 not having the issue.

     

    I will try to delete the

    ~/.FileSync and ~/Library/FileSync folders on both the client and the server and see if that clears things up.

     

    I'll let you know if it works.

     

    Thanks,

    Ray

  • by runnerboy967,

    runnerboy967 runnerboy967 Jun 11, 2012 7:18 AM in response to RayfromMD
    Level 1 (0 points)
    Jun 11, 2012 7:18 AM in response to RayfromMD

    I am also trying to do the same thing with the magic triangle configuration but storing the home directories on a Windows Server. What I've been noticing is when the portable home directory creates, it the desktop, documents and all of the user folders are hidden. Not sure why this is.

     

    Also I wanted to ask, in your magic triangle setup are you redirecting the Window's folders to the share and also trying to get the Mac to store user files in that location. What I mean and this is what I amt trying to do. --User logs on and in Windows has their destop & documents folder redirected to the server. I want it so when they walk over to a mac, everything on their windows destop shows up on their mac desktop and also for documents. Then if they save something there, the file should show back up in Windows. Been trying like crazy to get all of this to work.

  • by RayfromMD,

    RayfromMD RayfromMD Jun 12, 2012 8:20 AM in response to runnerboy967
    Level 1 (0 points)
    Jun 12, 2012 8:20 AM in response to runnerboy967

    Deleting the ~/.FileSync and ~/Library/FileSync folders on both the client and the server did not help.

    Deleting the /Library/Manager preferences did not help.

     

    Interestingly enough, I ran the dscl tool on the offending computer and found the AFP Home Folder path is missing.

    dscl . read /Users/jdoe/

     

    LastName: jdoe

    NFSHomeDirectory: /Users/jdoe

    OriginalNFSHomeDirectory: /Network/Servers/files.foo.lan/Users/jdoe

     

    on a working system... I see an AFP home folder path

     

    LastName: jsmith

    NFSHomeDirectory: /Users/jsmith

    OriginalAuthenticationAuthority: ;Kerberosv5;;jsmith@FOO.LAN;FOO.LAN; ;NetLogon;jsmith;FOO

    OriginalHomeDirectory: <home_dir><url>afp://files.foo.lan/Users/</url><path>jsmith/</path></home_dir>

    OriginalNFSHomeDirectory: /Network/Servers/files.foo.lan/Users/jsmith

  • by RayfromMD,

    RayfromMD RayfromMD Jun 12, 2012 12:02 PM in response to RayfromMD
    Level 1 (0 points)
    Jun 12, 2012 12:02 PM in response to RayfromMD

    I was able to fix the issue here. Steps Taken:  From the comand line I ran

     

    dscl /Search read /Users/jdoe HomeDirectory

     

    It returned # No such key: HomeDirectory

     

    This was the big clue.... it should have returned

    HomeDirectory: <home_dir><url>afp://files.hihllc.lan/Users/jdoe</url><path>/</path></home_dir>

     

    I unbound the Mac from AD and ran the following command in terminal.

     

    dscacheutil -flushcache

     

    I then went into OS X sharing preferences and renamed the computer slightly, so it would create a new computer record in AD. I rebound the machine to AD making sure in Directory Utility Advanced, under User Experience that Force local home directory on start up disk was unchecked and Network protocol to be used was AFP.

     

    I then ran

    dscl /Search read /Users/jdoe HomeDirectory

    and it returned

    HomeDirectory: <home_dir><url>afp://files.hihllc.lan/Users/jdoe</url><path>/</path></home_dir>

     

    I had the user reboot... which was necessary. When he logged in HomeSync fired up. He had quite a few conflicts, so I told him to select use files on this computer for all conflicts.

     

    I checked the FileSyncAgent.logs and it was good.

     

    Let me know if this fixes your issue.

     

    Thanks,

    Ray

  • by ovig,

    ovig ovig Jun 21, 2012 1:17 AM in response to RayfromMD
    Level 1 (0 points)
    Jun 21, 2012 1:17 AM in response to RayfromMD

    Thanks for the input, Ray

    Am away at the moment so cannot check for a few weeks, but will give it a go...

    Can I just ask which versions of MacOS you are using on both the client and the server?

    Olivier

  • by cdolan92,

    cdolan92 cdolan92 Jul 26, 2012 12:52 PM in response to ovig
    Level 1 (15 points)
    Jul 26, 2012 12:52 PM in response to ovig

    Have you found a solution yet, Ovig?

     

    I'm trying to properly set up an Open Directory and Active Directory magic triangle, but I am running into issues.

     

    I'd like to users to authenticate and use the home folders through Active Directory, but I'm unable to get their Active Directory Mobile Home Folders to work properly in Lion Server.

     

    For device provisioning, I'm going to use profile manager to keep the company computers 'in line', but the guys have logins to their computers through OD now, and then email/echange, etc through AD, and its a little confusing.

     

    Any help is appriciated,

    Charlie

  • by Completebabel,

    Completebabel Completebabel Jul 30, 2012 7:11 AM in response to RayfromMD
    Level 1 (4 points)
    Jul 30, 2012 7:11 AM in response to RayfromMD

    I did what you said even after the re adding to ad I still get the no such key for the home directory location. my question is where is this key stored and can I manually add it there?

  • by flick harrison,

    flick harrison flick harrison Jan 20, 2014 9:59 PM in response to ovig
    Level 1 (85 points)
    Jan 20, 2014 9:59 PM in response to ovig

    Crazy thing Ovig,

     

    I had this same problem after updating a client (test) machine to Mavericks and using Mountain Lion Server.

     

    The problem hadn't happened before.  Same symptoms as you re: soft fail during login / logout and hard fail during manual sync.  However it only happened on certain users, and not others.

     

    Turns out the failing Users had been set up incorrectly in Mountain Lion Server.  I had the users home folder set to "Local Only" and not "Users."  It's some time ago I set up all the accounts so I'm not sure how that happened.

     

    Why I hadn't noticed this is beyond me; this is a community centre media arts lab used for classes, in which the missions are rarely too critical...  The home sync is simply a safety backup for student work that so far hasn't been needed (knock wood).

  • by flick harrison,

    flick harrison flick harrison Jan 20, 2014 10:04 PM in response to flick harrison
    Level 1 (85 points)
    Jan 20, 2014 10:04 PM in response to flick harrison

    PS - I didn't experience until I updated to Mavericks on a client machine.  I never noticed it before, and it happened to turn up after updating.  Coincidence? I can't say.