Change Home Directory in OS X Mavericks

After upgrading to OS X Mavericks, when I open the terminal, I get the following error.

No home directory: / home / (my-user-name)

I can go to / Users / (my-user-name) to access my files, but I have to do this every time I open the terminal. It also affects my projects that access the home directory because the path is wrong.

Can someone tell me how to change the home directory to / Users / (my-user-name)?

+4
source share
1 answer

User entries in OS X are stored in the Open Directory database. To change the home directory for a user, you can

  • " "

    open "/System/Library/CoreServices/Directory Utility.app"
    
  • " ",
  • ": " ,
  • ,
  • "NFSHomeDirectory",
  • .

( ):

# dscl . -change Users/USERNAME NFSHomeDirectory OLDHOMEDIR NEWHOMEDIR

: ! Open Directory .

+14

All Articles