AD Home directory mounting at login?

wstewart3
New Contributor III

I have several users who do not want this option. We are using the AD functionality in JSS to bind the machines to the domain which creates mobile accounts.

I have unchecked the "Use UNC path from Active Directory to derive network home location"

But "Force local home directory on startup disk" is greyed out and selected. I am not sure if this is what is mounting that when they first log in and getting a "directory.org cannot be mounted" error.

Any ideas?

1 ACCEPTED SOLUTION

cbd4s
Contributor II

I've figured out Force local home directory on startup disk is automatically enabled and enforced when create mobile account at login is selected for AD join with mobile account.

It looks to me that if AD user account profile has Home folder set to a UNC path, it will be automatically mapped at the user login, in which case if the Mac is not on the corporate network, the user will get the error message "There was a problem connecting to the server ...".

Tested this workaround and it appears to be working:
Login as the AD user mobile account enabled
Open and unlock Directory Utility
View User in node /Local/Default
Search the user's name
on the right hand side, find OriginalHomeDirectory
change its value to <home_dir><path>/Users/username/</path></home_dir>
After this, when the Mac is offline, logging in as the user doesn't have the drive mapping error anymore and the home folder/drive can still be connected to manually.

View solution in original post

6 REPLIES 6

cbd4s
Contributor II

Hi, @wstewart3 , did you ever find out if it's possible to uncheck "Force local home directory on startup disk"? Thanks.

cbd4s
Contributor II

I've figured out Force local home directory on startup disk is automatically enabled and enforced when create mobile account at login is selected for AD join with mobile account.

It looks to me that if AD user account profile has Home folder set to a UNC path, it will be automatically mapped at the user login, in which case if the Mac is not on the corporate network, the user will get the error message "There was a problem connecting to the server ...".

Tested this workaround and it appears to be working:
Login as the AD user mobile account enabled
Open and unlock Directory Utility
View User in node /Local/Default
Search the user's name
on the right hand side, find OriginalHomeDirectory
change its value to <home_dir><path>/Users/username/</path></home_dir>
After this, when the Mac is offline, logging in as the user doesn't have the drive mapping error anymore and the home folder/drive can still be connected to manually.

wstewart3
New Contributor III

I think this worked.  However I took it a bit further to make it scriptable.  I think you can completely just delete the key...

sudo dscl "/Local/Default" -delete /Users/$USER OriginalHomeDirectory

Of course if you are scripting through JSS script I think you can use $3, or you would need to grab the active user and resplace $USER.  I think $USER will just be root or something else if JSS is running it.

bcbackes
Contributor III

This post even though it's 2 years old has helped me where all others have failed. Thank you so much @cbd4s for this info. I was banging my head against a wall trying to find out what was attempting to map a network share at login and was preventing users from logging in and I believe this will resolve the issue. FYI, I took @wstewart3 script and set it up so it would remove that setting for all users on the Mac. My script I have some additional values where some of the network share info was stored so I'm removing those as well. Thanks to @wstewart3 for the assist!

 

#!/bin/sh

# Find all user directories
userDirs=$(dscl . -list /Users | grep -v '_')
for user in $userDirs; do
  
  #Clearing the OriginalHomeDirectory setting
  dscl "/Local/Default" -delete /Users/$user OriginalHomeDirectory
  
  #Clearing the OriginalNFSHomeDirectory setting
  dscl "/Local/Default" -delete /Users/$user OriginalNFSHomeDirectory
  
  #Clearing the SMBHome setting
  dscl "/Local/Default" -delete /Users/$user SMBHome
  
  #Clearing the SMBHomeDrive setting
  dscl "/Local/Default" -delete /Users/$user SMBHomeDrive
  
  #Clearing the dsAttrTypeNative:original_smb_home setting
  dscl "/Local/Default" -delete /Users/$user dsAttrTypeNative:original_smb_home
done

exit 0

 

wstewart3
New Contributor III

Glad it helped!

endor-moon
Contributor II

We bailed on home directory mounting because no one seems to be supporting it anymore and there were lots of issues with various software packages trying to save hundreds of small preference files on the remote homedir. When it works, it is simply wonderful, as our student's data follows them around like a puppy. However, the downsides started to outweigh the upsides. Please let us know how it is working out for you.