Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 '14 at 17:16

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 '14 at 5:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .