Mac Password Hacking

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:

  1. Click Restart at the login window
  2. 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.
  3. At the Localhost% prompt type:

    /sbin/fsck -y [Enter]
    /sbin/mount -uw / [Enter]
    sh /etc/rc[Enter]

  4. When the Localhost% prompt reappears, type:

    passwd [username]

    (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.

  5. After entering the new password, type:

    reboot

  6. At the login window, enter the username with the new password.

    Voila!

Tags: , ,

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

http://www.rit.edu/its/services/desktop_support/mac/xforcenewadminacccount.html

This article seems to imply that I will be able to go back to the original user/admin accounts. Is this correct? Thanks so much for your help!

You could have just popped in the instal dvd and restarted holding option. it would then show you your boot options wait till you see the disk and click it then when it boots select your language then go utilities in the menu bar and click reset password

Uh, I’m not getting any ‘Localhost%’ prompt. I get a ton of text after holding command-S, and it all stops on ‘:/ root’. What am I missing here? When I follow the rest of the instructions nothing else works.

And also, before I’m going to dare try what Donnie mac’s instructions above, does anyone know if
1. Does it wipe your info?
2. Does it wipe your accounts?
3. Does it wipe system stuff and applications?
4. Does it wipe browser bookmarks?
5. Does it wipe anything at all?

Sorry if I sound a bit noobish, because I am a bit noobish at this kind of stuff.

All of these questions are already answered in the comments.

Ok, just saw your newer post regarding Mac password hacking on Snow Leopard. That worked for me. Cheers Dave!

when i try /sbin/mount -uw / it does nothing and when i do /sbin/mount -uw/ it says illegal action. Can you help me?

Okay, I was wondering. You said Prompt type: /sbin/fsck -y [Enter]
/sbin/mount -uw / [Enter]
sh /etc/rc[Enter]. do we type that? and where do we type it?

Okay, so I got our family mac laptop in our divorce and my ex put a password on it before he handed it oer and refuses to tell me the password OR even the username. Is there a way to bypass the username as well? Please tell me that there is and that I am not stuck with a useless mac.
Thanks

if you use this method does it reset everything to factory and erase everything?

This question has already been answered. Please be sure to read the full post and comments before posting questions.

The original post does not work for me, I have a iBook with Mac OS X, however, when I used the instructions that reset everything back to the default settings like the Indian guy says to do…it worked!! :)

Thanks!

Dave, Do you think this would work on an older, or younger verson of mac, such as a G4 Mac

This is more OS version dependent than it is hardware dependent. I originally did this on a G4 running OS X 10.4 “Tiger”. As usual, YYMV.

MAN I LOVE U! U SAVED MY ASS!

i have a school laptop but i didnt realize it didnt come with a password so im now stuck with a usless machine. i tried the steps u explained except they dont work on tis computer.. any other idea i dont care about the memory or data factory reset would be better for me….

Try this: http://nothing.golddave.com/2010/12/27/more-mac-password-hacking-snow-leopard/

If that doesn’t help then I’m out of ideas.

YOU ARE A GOD AMONG MEN!!!

Doesn’t work, OS X Lion

FYI if CTRL+ S is not working and you are using a NON-APPLE mouse, unplug the mouse and try again. Daft as it sounds it works for me ( also for CTRL+C )

R U sure this works?

It’s an old post. Use at your own risk. Read the comments and companion post for more information.

GREAT advice dave!

MY modifications of your instructions:
– used “-uaw” instead of “-uw” for the “mount” command
– after typing “passwd [username]” i got the blue screen for a while and then only black screen with little block cursor in top left corner… i just typed the new password and was rewarded with a prompt to retype it. 😀

“a god among men indeed!” :)

i tryed it alot of times and i wont work for me and i really need my laptop asap do you know if theres another way i could try

The comments here are littered with other variations. There’s also another post on this blog about Mac password hacking that may be helpful. It’s mentioned in these comments or search for it.

well, i have two accounts logged onto m account, and my family NEEDS to get onto my dads account, cause he passed away, and we do not know his password.. .can you help me figure out how to do that?

All I can offer is what’s I wrote in my posts and what’s been written in the comments. Sorry.

you guys complain a lot

Hi Dave,

Not sure if you are still replying to comments on this thread. I tried different variations of the commands and found one that worked where it prompted me to retype the password. After it rebooted, no login window appeared, but when I tried to install an update, it said my password was incorrect and it was the new password. I have a Powerbook G4 with Tiger. Any ideas? It would be GREATLY appreciated. Thank you. :)

Wow, you saved me a lot of trouble. Thanks so much !!! <3 <3

Does this delete/replace the old username, or create a seperate user name that will show up on the login screen?

nvm, is there a way to just create another username though, without accessing the admin. i just want to temporarily use this mac but not on guest mode

what do the brackets mean?

What if your keyboard wont type on the single user mode? its brand new with new batteries and it will type just not on the single user mode. can somebody help me?

OMG Indian guy! You are my hero!

Marry me!

Hey so i have seen so many threads about people saying just press cmd + s and it will boot in single user mode
sure easy enough if the computer does not have a firmware protecting it… so i thought maybe i should take out some ram and try then it sure to bypass it right? well see as how we are dealing with mac not windows they obviously hired hackers to try and hack it derp… so i thought myself what if i took out a piece of ram and booted and then pressed Cmd + P + R which programs the ram… still so i thought what if theres a bios trick since theres a password on the mac so i restarted my mac with 2 out 4gb of ram in it held down CMD + p + R let the mac reboot rapidly 3 times to bypass bio key and then ran it in single mode ( Cmd + s) and what do you know a 21 year old average kid just bypassed a corporations security key hope this helps!

Hello and thanks to:
Comment by Akash Gupta(indian guy) on May 29, 2007 @ 10:21 am

This worked perfectly;

/sbin/fsck -y [Enter]
/sbin/mount -uaw [Enter]
rm /var/db/.applesetupdone [Enter]
reboot [Enter]

This reset the computer to like the first time turned on!!

Thanks again….nik

So what do u put for the passwdusername thing I am confused can u give an example

the command s thing worked but it lets me type for like 5 seconds and then restarts again any advice?

Just tried Akash Gupta(indian guy)’s sequence on an iMac G3 and it worked like a charm. THANK YOU!!

=[ ]

thanks bro. its make a lot!

I did this but somehow it didn’t work when I typed in “sh /etc/rc”. It said command not found. does this work anymore? can someone help if they know what I am talking about? thx

does the [enter] mean press enter or type enter?

I have one question. If I change the password, my brother (who has the admin) will notice and realize that I haxed it. What to do?

my ibook doesn’t have an option to reboot…

Wow, you have a lot of comments, it took me awhile to read ’em all. Now to my question, do you know of a way to simply find out the user’s password so that I may get through or maybe just skip the login screen? I know you have gotten quite the bit of comments sir and this may not exactly pertain to your post, however at the moment I don’t know who else to ask.
Thank you kindly sir,
Don James

Just comes up name and password again

Niklas, of 2012! I bought a 2007 iMac that was in pieces. Put it together, worked but had an “admin password ” which wouldn’t allow me to do anything! Researched help for 2 months. Bought new OS X disks and nothing worked! THEN ! I can across your simple remedy AND IT WORKS! It reset the iMac to new specs and the screen even looks Great!!! Thank You

Leave a comment

(required)

(required)