Renaming your OSX Home Dir and Breaking Dropbox
Wednesday 16 July 2014 at 4:47 pmI just got a shiny new MacBook Pro from work, but they set it up with the username “peterbeckman” even though everything else here is “pbeckman.” Being lazy and not wanting to type “ssh pbeckman@host” every time, and not also wanting to need to set up each host in .ssh/config I set off on renaming my account in OSX Mavericks.
Luckily some kind soul had already figured out how to rename your OSX Mavericks short username and posted it on the web. I followed “The full monty” instructions with great success.
But after reboot and subsequent login, Dropbox failed, complaining about permissions on my old Home directory. I didn’t save the error message, but it looked like it didn’t have permissions to the directory (because it no longer existed). I tried re-installing Dropbox, but that didn’t reset things.
After creating a symlink from /Users/peterbeckman to /Users/pbeckman (ln -s pbeckman peterbeckman) I was able to get Dropbox to start, but it annoyed me that it was still looking at my old $HOME. So I tried under Dropbox > Preferences > Account to change the parented home dir, but it complained that the Dropbox folder already existed. Well duh.
So finally I unlinked the account, removed the symlink, re-linked the account, and Dropbox found the existing files that had already been copied onto my host and all was seemingly well again.
Short version:
- Change OSX Mavericks short username and rename Home Directory to match
- Symlink your previous home directory to the new one
- Restart Dropbox
- Dropbox > Preferences > Account
- Unlink account
- Quit Dropbox
- Delete the Symlink
- Start Dropbox, Re-Link Account
- ...
- Profit!