Khymon1

Q: Home Directory not changed on client

Hello,

 

I am running MacServer 5.1.7 and a MacBook with OS X 10.11.6. I am using mobile accounts on the MacBook, but I have problems with home-dirs from network users:

 

1. There are some existing network users I want to give another path to a home-dir, not located under /Users/, but under /home. I changed the path from /Users/userold to /home/userold in the appropriate setting of the user account in the server app. But when I log on to the MacBook, the old home-dir is still set (terminal, "echo $HOME" still gives "/Users/userold" as output).

 

2. When I create a completely new User in the server app and instantly give /home/newuser as path to home-dir before having logged on the first time with this user on the MacBook, it works - then "echo $HOME" gives /home/newuser as output.

 

How can I change the path of the home-dir of existing users on the MacBook?

 

Greets

Mac mini, OS X Yosemite (10.10), with server 10.10

Posted on Jul 26, 2016 3:33 AM

Close

Q: Home Directory not changed on client

  • All replies
  • Helpful answers

  • by Strontium90,

    Strontium90 Strontium90 Jul 26, 2016 5:55 PM in response to Khymon1
    Level 5 (4,067 points)
    Servers Enterprise
    Jul 26, 2016 5:55 PM in response to Khymon1

    The issue you are likely running into is that you have not cleared the cached credential of the existing users.  You can do this in a few different ways.

     

    Open System Preferences and choose Users & Groups.  Select the user from the list and then press the – button.  Be careful at this point.  Choose the option "Don't change the home folder" and press the Delete User button.  This will delete the user attributes but leave the user's home folder relatively untouched.  (the home folder will be renamed).

     

    Or you can use dscl from Terminal to remove the user attributes.  As with System Preferences, the user data remains in place.  Here is an example command.

     

    sudo dscl . -delete /Users/username

     

    Once you purge the cached credential, you can return to the login window and the user logins should work.  Keep in mind that you will want move the user's existing home folder to /home.  If you do now, a new home folder will be created but user data will remain in /Users.

     

    Hope this helps,

     

    Reid

    Apple Consultants Network

    Author - "El Capitan Server – Foundation Services"

    Author - "El Capitan Server – Control & Collaboration"

    Author - "El Capitan Server – Advanced Services"

    :: Exclusively available in Apple's iBooks Store

  • by Khymon1,

    Khymon1 Khymon1 Jul 26, 2016 10:58 PM in response to Strontium90
    Level 1 (4 points)
    Apple Watch
    Jul 26, 2016 10:58 PM in response to Strontium90

    Hi Reid,

     

    thank you for your answer.

    I did what you suggested and now, the path set in server manager is taken over by the client. But I still have the following questions:

     

    1. Does that mean that when I change such settings in network accounts, that I have to clear the cache on clients every time? Should´t this be taken over at every logon of such a user?

     

    2. The user I can now logon to the correct home dir however can not sync his home dir anymore. In profile manager, I activated all 4 options ("at logon" , "at logoff" , "manually" , "in the background"). When I now try to manually sync the home dir, I get an error message that the user has no write permissions in the "folder (null)". It seems to me that the new home dir was not taken over by the sync service - or what could be wrong here?

     

    Greets,

    Michael