4

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?

2 Answers 2

4

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.

1
  • 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, 2014 at 17:16
1

To rename the volume, enter the following:

/usr/sbin/diskutil rename oldname newname

for example:

/usr/sbin/diskutil rename OSXUsers "OS X Users"
1
  • 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, 2014 at 5:45

You must log in to answer this question.

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