How to Reset a Lost Admin Password on Mac OS X


If your Apple is running OS X, and you are having trouble accessing the administrator’s account, follow these few easy steps that will get you full administrative 
Using System Preferences step

1
Go to the Apple menu in the upper right hand side of the screen and click “Log out username”.

Reset a Lost Admin Password on Mac OS X Step 
2
On the accounts presented in the menu select the admin account and enter the password.

Reset a Lost Admin Password on Mac OS X Step 3
If you keep on failing, it will ask for your master password that can be changed at the Security menu in system preferences.

Reset a Lost Admin Password on Mac OS X Step
Using Single-User Mode

Forget your password to the only administrator account on your Mac? Unable to install software or even log in because you just cant remember which one of your favorite pets you used for the password? Or do you need to access the Super-User (root) account to make changes not allowed even to Administrators?
No worries! We’re going to reset that pesky password without loosing any of your data or files – and it only takes about five minutes!
1
Access Single-User mode.
Shutdown your computer. (Turn it right off – do not restart.)

Reset a Lost Admin Password on Mac OS X Step 2
Use your left hand to hold down the ‘Apple’ or ‘Command’ key on the keyboard (directly beside the space bar) and the letter ‘S’ . Hold both of these together and do not let go through the next step.
Turn the computer on, ensuring that your are still holding the ‘Command’ and ‘S’ keys.

Reset a Lost Admin Password on Mac OS X Step 3
Wait until you see a bunch of white writing scrolling by on a black screen. You can release the keys, and you are now in Single-User mode. The computer is ready to continue when you see localhost:/ root# or something similar as the very last line on the screen.

Reset a Lost Admin Password on Mac OS X Step 4

Check the drive for errors. Next we want to check the drive for errors (and fix them if there are any). We do this because of the power of Single-User Mode, we do not want to be making massive changes to the file-system if there are underlying issues which could be made worse. Right after the # on the last line of the screen type fsck -fy and press [Return] when the process is finished (approximately two to three minutes) you will see localhost:/ root# (henceforth referred to as the prompt) again.

Reset a Lost Admin Password on Mac OS X Step 5

Access the drive so that we can make changes. Before you can reset your password you need to mount the drive; this will allow you to make changes to files. At the prompt type mount -uw / and press [Return].

Reset a Lost Admin Password on Mac OS X Step 6

Reset the password.
Type launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist and press [Return].

Reset a Lost Admin Password on Mac OS X Step 7
Type ls /Users and press [Return]. A list of all of the accounts on your computer will be listed along with ‘Public’

Reset a Lost Admin Password on Mac OS X Step
Type dscl . passwd /Users/username password while replacing username with one of the users displayed in the previous step and replacing password with the new password of your choice. Press [Return]. Ignore error message appearing after entering this command.

Reset a Lost Admin Password on Mac OS X Step
8
Restart the computer and try the new password. At the prompt type reboot [Return]. The computer will restart and you will now be able to use your new password.

Breakdown of commands used in this document
fsck -fy
This command is a ‘File System Consistency Check’ and works very much the same way as Disk Utility’s ‘Repair Disk’ function.
Mount -uw /
The mount command gives us access to the files on the system so we can make changes.
cd /Users
This command is the ‘Change Directory’ command and here we are changing directories to the ‘Users’ folder where all of the accounts are stored.
ls
This is the list command and shows us everything inside the folder.
passwd <username>
This command tells the computer that we want to replace the password for the specified account.
reboot
This command restarts the computer.
67 Helpful? 93
If for any reason you need to use the root user on your computer you can use these steps to activate the root account by simply using the username root when you get to the passwd command (ie. passwd root). When you restart the computer you will have an option on the login screen for ‘Other’ click it and type root as the username and whatever password you selected.

Leave a Reply

Your email address will not be published. Required fields are marked *