osx - Segmentation Failure 11 in Single-User Mode

08
2014-07
  • 333

    I booted up my Mac in Single User Mode (by holding down Command-S while it boots) so then I have access to a terminal that is logged in as root. But when I run passwd to try to change root's password, it just writes "Segmentation Failure: 11". How can I fix this?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    mac - OSX root user keeps re-enabling itself on reboot
  • geodave

    Running Snow Leopard. Completely inexplicably, I seem to have enabled the OSX root user by accident. I honestly have no idea how it happened, but if memory serves I was looking at the login pane (with my two user accounts) when I must have hit something, and suddenly the two accounts were replaced by one that just said "Other..."

    Clicking the "Other..." account allows me to type a username and password, but neither of the normal two accounts would work. Since I never set a root password, it wouldn't let me in that way either.

    So I booted into Single User mode and ran these commands:

    /sbin/mount -uw /
    fsck -fy
    launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
    dscl . -passwd /Users/root newpassword
    

    and that let me login as root. Then, I went to System Preferences, Accounts, Login Options, clicked Join, Open Directory Utility, and lastly in the Edit menu I clicked "Disable Root User"

    Great, I thought, back to normal. Except rebooting, I still only have the Other... account visible, and the root password I set beforehand doesn't work anymore! I have to reboot into Single User Mode and go through the whole process again just to get back into the system (as root)

    How on Earth did I accidentally enable this? I didn't even know about the Directory Utility before now. And most importantly, why the heck would it be re-enabling the root user on boot? Thanks in advance to any help!


  • Related Answers
  • geodave

    The problem turned out to be that the /Users folder, or some related configuration became corrupt. My user home folders were still there but the Accounts pane of System Preferences didn't list them.

    Running ls -lah on /Users showed that my two normal accounts had "501" and "502" as the user and "staff" as the group, rather than the expected shortnames as the users.

    This was resolved by simply re-creating the user accounts and opting to use the existing home folder. Wish I'd thought to do that. All is well now though.

  • Seasoned Advice (cooking)

    Revert to an old Time Machine backup, or failing that, an Archive and Install and repair your installation. It sounds like you've broken it irreparably.