I had an interesting task at work last week. I had to prepare a Mac for some testing. Doesn’t sound like much but the Mac had been used by a former employee and nobody knew the password he had used on it. I tried various possibilities based on my knowledge of him, his family, his work and his interests. None of them worked. This called for a more subversive approach.
I did some searching on Google and found a page that discusses how to hack passwords on a Mac. Various methods suggested on several pages of comments to that page had failed. Figuring I had nothing to lose I decided to try mixing the methods I had found until I found one that worked. I figured if I hosed the machine at this point it wouldn’t be a big deal. The machine was useless to me in it’s current state anyway so I would have had no qualms about clearing the hard drive and starting from scratch. The only reason I was still going at it was for the challenge. So off I went.
After only about 2 or 3 tries I came across the following method that worked for me:
- Click Restart at the login window
- While the computer is restarting, hold down “Command-S” until you see text scrolling through the window. This boots the computer into single user mode.
- At the Localhost% prompt type:
/sbin/fsck -y [Enter]
/sbin/mount -uw / [Enter]
- When the Localhost% prompt reappears, type:
(Replace [username] with the username you want to change and leave out the brackets.)
You will then be prompted to type a new password for this user 2 times.
- After entering the new password, type:
- At the login window, enter the username with the new password.