I have my Users directory on a separate disk on my Mac Pro running SL. That Volume was named OS X Users and the spaces were not playing well with some software. I (stupidly) renamed the Volume to OSXUsers and now I cannot log in.

"Logging in to the account failed because an error occurred."

I assume I just need to boot into single user mode and undo my Volume rename. How would I change the Volume name that OS X uses during normal startup while in single user mode?

link|improve this question
feedback

2 Answers

up vote 3 down vote accepted

You don't need to rename the volume.

Use the directory services command line utility to read the current path to your user's home directory:

$ /usr/bin/dscl localhost -read /Local/Default/Users/danielbeck | grep NFSHome
NFSHomeDirectory: /Users/danielbeck

Set it to a different value (enter first the previous value you just read, then enter the new value):

# /usr/bin/dscl localhost -change /Local/Default/Users/danielbeck NFSHomeDirectory /Users/danielbeck /Volumes/OSXUsers/danielbeck

You might need to enclose a value with space characters in it in double-quotes, e.g. "/Volumes/OS X Users/username".

I'm not sure directory services are available in single user mode, though.

link|improve this answer
This worked. Thank you – Jeff Swensen Jul 10 '11 at 17:55
feedback

To rename the volume, enter the following:

/usr/sbin/diskutil rename oldname newname

for example:

/usr/sbin/diskutil rename OSXUsers "OS X Users"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.