Macbook - Forgotten password

August 2016

You forgot your username and password to get into your Macbook and you don't have the original CD?


You can use this tip to create a new administrator account - then you can change the other passwords. Make sure you don't add space in between the db/.Apple and use capital letters where they sit in the code and it should work:

# Reboot
# Press Apple + s down after you hear the chime.
# When you're prompted to do so, enter these commands to create a new administrator account (hitting return after each line):
  • mount -uw /
  • rm /var/db/.AppleSetupDone
  • shutdown -h now

# After rebooting you should have a new administrator account. When you login as the new administrator you can delete the old one and you're good to go again!


Thanks to xpcman for this tip on the forum.

See also :

This document entitled « Macbook - Forgotten password » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.