Change Mac Admin Password without the disk

Recently, a friend of mine gave me his old MacBook. He reformatted the machine for me and set up the user name and password. Unfortunately, after not needing to enter the password for a few months, I forgot it. Since I didn’t have the disk, it wasn’t going to be such an easy task to fix.

I did some research and came across this article: Change Mac admin password without the disk [Solved/Closed]. But for some reason, I couldn’t get it to work on my Mac, which is running OSX 10.5.8. The commands in step 3 weren’t working. I did some more Googling and figured out the problem. Here is the new instructions that worked for me:
1. Reboot
2. Hold apple key + s key down after you hear the chime. (command + s on newer Macs)
3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):

/sbin/mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now

4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and your good to go again!

This worked! Now I can install and update programs that require admin access!

Disclaimer: I am in NO WAY a computer programmer, and if you leave comments asking for help, I probably won’t respond. I recommend going to the link above if you have problems.