Fixing an incorrectly set home directory on 10.5

I recently tried to change my home directory on my Macbook to less than stellar results. In the end I couldn’t sign in to my one and only user account. Had I had another account I could have more easily fixed it, but without a second account here is one method you can follow.

Reboot your Mac and before the tone sounds press and hold command+s. This will tell OS X to load in single user mode, dropping you to a root shell. Next, type the following

DirectoryService &

and press enter. This will start a necessary service. Next, type the following

chfn

where username is the username you need to fix. An editor (vi) will load allowing you to change the home directory for that user. Edit the file and save the changes (search google if you’ve never used vi) and reboot the Mac by issuing the ‘reboot’ command. You should now be able to sign in to your once broken account.

Leave a Reply

Your email address will not be published. Required fields are marked *