Yesterday afternoon a friend dropped his computer by so I could make it go a bit faster which I initially thought must just be some application using up a ton of resources or something. The issue ended up being that the computer was an older PowerPC G4 running Mac OSX 10.3 that didn’t have a lot of RAM and hadn’t been updated in a long time. I happened to have PC133 RAM to stick in it so I added 512MB of RAM and then attempted to begin the software updates which requested his administrator password which I did not have. Turns out that he didn’t have the password either so below are directions on reseting the administrator password on a Mac running OSX. The process take a little while as you are required to boot into single user mode, go back through setup, modify the admin, and then delete the temporary admin account.
Reset Mac OSX Administrator Password Without Install CD:
- Boot Into Single User Mode: First you will need to boot into single user mode which can be done by restarting the computer and holding the “apple key” + “s” after you hear the boot tone. Make sure to continue holding the key combination until you see something similar to the below screen which indicates you are in single user mode.
Be patient as it will load the apple boot screen and then display the single user mode screen above. If you need more information on single user mode click here.
- Mount Root Partition: Now mount the root partition by issuing the below syntax from the prompt displayed in the screen above.
localhost:/ root# mount -uw /
The below image also displays mounting the root partition from single user mode.
- Remove AppleSetupDone File: Now issue the “rm” command as displayed below to remove the .AppleSetupDone file which will allow you to go back through setup after rebooting.
localhost:/ root# rm /var/db/.AppleSetupDone
This is also shown in the image below and as you can see there is no confirmation that the file has been removed.
- Shutdown Computer: Now issue the below also from the single user mode command line interface to shutdown the computer. The below command tells the computer to halt immediately or shutdown immediately.
localhost:/ root# shutdown -h now
- Power On Computer: Click the power button on your Mac to power it on. When the computer powers on you will be taken to the Mac OSX installation welcome screen as shown below.
- Navigate Installation Screens: Answer all of the questions on each installation screen to complete the addition of the new administrator account. You will be required to navigate through numerous screens including Welcome, Personalize Your Settings, Your Apple ID, Registration Information, A Few More Questions, Thank You, Create Your Account, Get Internet Ready, How Do You Connect, Your Local Area Network, Get .MAC, Now Your Ready To Connect, Select Time Zone, and Thank You. Please note on the below screen (Your Account) you will not be able to use the exact same username because the old username still exists on the computer.
After navigating through all of the new installation screens you will be logged in. Now we need to follow the directions below to modify the password of the old account and then delete the new account we just created.
- Modify Old User Password: Open a Terminal window from the Finder menu underneath Applications >> Utilities. Type the below syntax to become the root user. After typing the below you will be asked for a password which will be the password of the user you created in the previous installation steps.
Mac OSX Become Root User:
sudo su -
Mac OSX Modify Old Users Password:
Above you should use the username of the previous user (can be found by “ls /Users” from terminal prompt) and then type in a password for the old user so you can login. After modifying the old users password you can close the Terminal window.
- Login As Old User: Now login as the old user by clicking on the Apple Icon in the top menu and selecting the Log Out option from the drop down menu. After logging off you should see two usernames from the login screen so make sure to select the new user.
- Delete Temp User Account: After logging in as the old user you have verified that you have successfully reset the password so you can delete the temporary user account by selecting the Apple Menu again and this time selecting System Preferences from the drop down menu as shown below.
Once System Preferences is open select the Accounts underneath the System sub menu as shown below.
From the accounts window shown below you can highlight the old account and click the “-” button below the list of accounts to delete it.
- Reboot: Now reboot the computer and verify that there is only one account which is the old account you wanted to login to begin with.
Your password has been reset on the initial Administrator account and you can now issue upgrades, etc. on Mac OSX.