Daily Tech Tip: Forgot your Password? Create a new Admin
This tip is a little more hardcore.
If you’ve forgotten your password, or need to gain access to a mac which you don’t have the password for, you can use the following tip to gain full admin access to the mac.
just remember, with great power comes great responsibility.
also caveat emperor using terminal commands in single user mode can seriously fuck things up if you don’t follow intructions exactly.
in particular the rm command = delete
1) Boot your machine into Single user mode by holding down Command-S (apple-S).
2) Issue the following commands (without double quotes), followed by Enter:
“mount -uaw”
“cd /var/db”
“rm .applesetupdone”
3) This “hidden” file (.applesetupdone) we just deleted tells OSX that the initial setup has already been done. By deleting it, we are “forcing” OSX to do the initial setup process all over again. During this process we create a “dummy” user account. This dummy account will have admin privileges, so we can use it to RESET the password on the other account (the account you can’t remember the password for).
So Reboot the machine (using “reboot” command or “shutdown -h now”) and setup your dummy account, reset the “real” accounts password and optionally delete the dummy account once you get access to the “real” account.
