Last active
August 29, 2015 14:16
-
-
Save oeeckhoutte/4c9cdea662531b043661 to your computer and use it in GitHub Desktop.
[OSX][Lion] Reset Root password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All you have to do is turn on your computer holding CMD + S. This will boot your Mac in Single-User Mode. Next, you have to wait a second while kernel will load command-line interface. It there is :/ root# line, you’re ready to go! | |
OSX Lion | |
First of all, type | |
# /sbin/fsck -fy | |
This will take a while. It will check the consistency of your filesystem. If there is no error, your output should be similar to this: | |
** /dev/rdisk0s2 | |
** Root file system | |
Executing fsck_hfs (version diskdev_cdms-491.6~1). | |
** Checking Journaled HFS Plus volume. | |
** Ckeching extents overflow file. | |
** Checking catalog file. | |
** Checking multi-linked files. | |
** Checking catalog hierarchy. | |
** Checking extended attributes file. | |
** Checking multi-linked directories. | |
** Checking volume bitmap. | |
** Checking volume information. | |
** The volume Macintosh HD appears to be OK. | |
:/ root# | |
The last three steps are very quick: | |
# /sbin/mount -uw / | |
# launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist | |
# passwd root | |
Bash will ask you for the new password for your root account. Type, retype and done! You can now safely type | |
# exit | |
and your Mac will display the Login Screen. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment