Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 4 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.

share|improve this answer
    
This worked. Thank you –  Jeff Swensen Jul 10 '11 at 17:55
    
Directory services are not available by default in single-user mode, but you can load them on demand: OSX 10.9: launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist; older versions: launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist –  mklement0 May 3 at 17:16
add comment

To rename the volume, enter the following:

/usr/sbin/diskutil rename oldname newname

for example:

/usr/sbin/diskutil rename OSXUsers "OS X Users"
share|improve this answer
    
Unfortunately, diskutil by default doesn't work in single-user mode; the error message suggests that this is by design. Apparently it is possible, albeit cumbersome, to get it to work, as some brave souls have determined through trial and error: see system-fabrik.de/diskutil-single-user-mode (article is in German, but the required commands are shown; method still works as of OS X 10.9.2). –  mklement0 May 5 at 5:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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