0

I recently fired up an old Mac Mini that I haven't used for years, and found that I forgot the admin account password.

I managed to get the password hash, but have hit various snags when following guides on decrypting this. (e.g. zip utility crashes when trying to open the downloaded 'John the Ripper' utility zip file).

Can anyone recommend a hash decrypter? Windows or OS X is fine. The password itself will be some simple short thing that is only slightly better than nothing.

account username: admn password hash: 6646e657f86732f846bb44f66e0add96e2a48c6e

3
  • 3
    This is a 160 bit hash, might be SHA-1. There is no way to decrypt a hash, since its domain (all possible passwords) is larger than its image (the possible hash values). You can only generate the same hash from given input (i.e. brute force it), and hope you get the same result. Which is difficult when the hash is salted. I'd say your approach is flawed. Just boot into single user mode or from an OS X DVD and reset the password.
    – Daniel Beck
    Commented Jan 31, 2012 at 14:23
  • Thanks @Daniel - actually I tried following a guide to reset the password, but found that the 'passwd' command simply returned without letting me enter a new password. I no longer have the OSX disk - in extremis I will put out a request for one at work.
    – mackenir
    Commented Jan 31, 2012 at 17:18
  • "There is no way to decrypt a hash" however it does seem to be possible to brute-force a OSX password hash. If you google doing it, you hit various webpages. Someone wrote a python script to do it, although when I tried that it didnt work either, due to missing imports.
    – mackenir
    Commented Jan 31, 2012 at 17:19

2 Answers 2

2

If you just want to get into your Mac, restart it from the System Restore DVD that should have come with it, or a Mac OS X install DVD (by holding down the C key at startup). Then, one of the options under the 'Utilities' menu should allow you to reset your administrator password. Full, official Apple instructions here

1
  • I no longer have the CD/DVD.
    – mackenir
    Commented Jan 31, 2012 at 17:20
1

Macs are based on Unix. If you are just trying to get a password, why don't you use something like a "System Rescue CD" which will allow you to change passwords of any machines utilizing a linux based kernel? That's how I change all passwords.


You can also try booting into single user mode. Actually, to simplify this, here's a guide that can explain this process:

If you don’t have admin access, boot the computer into Single-User Mode by holding CMD+S on startup, mount the drive, and type the command:

/sbin/mount -uw /

Followed by:

launchctl load
/System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

And finally:

passwd

Then, enter your new root password when prompted twice. After the password has been reset, type:

restart

And hit return/enter.

5
  • Mac OS X is not based on Linux, it's Mach & NeXTSTEP. But either way, you cannot retrieve the passwords themselves, only the hashes, which aren't very useful; it's easier to just change the password as described in the HackMac article. Commented Jan 31, 2012 at 14:54
  • 1
    ... I said it's based on UNIX. You can use a LINUX KERNAL to retrieve the password. Just like on a Windows machine I use a LINUX KERNAL to mount the HD and change passwords, the same can be done for a MAC, which is essentially what you're doing in Single User Mode.
    – Ethabelle
    Commented Jan 31, 2012 at 14:55
  • While OS X is based on UNIX, it uses a unique format for storing user passwords; unless you have OS X-specific tools on your Linux CD, it won't be very useful. Commented Jan 31, 2012 at 18:49
  • Actually that's a guide that I tried using - didnt work due to the 'passwd' command doing nothing. But I see it mentions a hash cracking tool that might work.
    – mackenir
    Commented Feb 1, 2012 at 13:39
  • @mackenir Interesting. The only other route I could think to go is to create a new Admin account which would still be way easier than attempting to break a hash ----- Line 1: mount -uw / (there is a space between -uw and the /) Line 2: rm /var/db/.applesetupdone (there is no space between db/.applesetupdone) Line 3: shutdown -h now (reboot will also work) -- source: alittlepieceoftech.wordpress.com/2011/04/21/hackbit-hack-a-mac
    – Ethabelle
    Commented Feb 1, 2012 at 14:49

You must log in to answer this question.

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