# [HOWTO] Reset User Password via single user mode



## Satcomer (Apr 23, 2008)

Read this MacOSXHint on how to reset your 10.5 password via the single user mode. 



> 1. Boot into single user mode (press Command-S at power on)
> 2. Type fsck -fy
> 3. Type mount -uw /
> 4. Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
> ...


----------



## g/re/p (Jul 26, 2008)

Cool hack!  And one more reason to block single user mode by setting a firmware password if you use a mac at work!


----------



## dbash (Aug 26, 2008)

Thank you very much, but when I boot I hear the chime and then nothing but a black screen.


----------



## whisky1980 (Aug 27, 2008)

says command not found when i type passwd somebody please help..!


----------



## nixgeek (Aug 27, 2008)

whisky1980 said:


> says command not found when i type passwd somebody please help..!



Check your thread for my response.
http://macosx.com/forums/mac-os-x-system-mac-software/302626-help-resetting-password.html


----------



## Flondrixa (Feb 10, 2009)

instead of typing
dscl . -passwd /Users/username password
just type 
passwd /Users/username password
thats what worked for me.


----------



## sheraz4u (Feb 24, 2009)

single user mode reset password:leopard
mount -uw /
ls /users
passwd (user's name)
(enter the password cannot be seen) 
reboot


------

single user mode change password tiger

1.  mount   -uw  /         
2.  sh   /etc/rc
3.  ls  /users
4.  passwd (user name)


----------



## bertnspike (Apr 5, 2009)

sheraz4u said:


> single user mode reset password:leopard
> mount -uw /
> ls /users
> passwd (user's name)
> ...



I'm sorry, but I don't understand you at all.  I bought a used mac laptop.  The person I bought it from doesn't remember the password, so I can't install any new software or make myself the administrator.  What can I do?


----------



## Satcomer (Apr 6, 2009)

bertnspike said:


> I'm sorry, but I don't understand you at all.  I bought a used mac laptop.  The person I bought it from doesn't remember the password, so I can't install any new software or make myself the administrator.  What can I do?



Ask yourself if it is a PPC or Intel Mac? Plus whenever asking for help please list the Mac and possible the version of OS x you are using.

Now do you know how to boot into Single-User mode? For the instructions to boot into that mode and once that comes up type the instructions provided by sheraz4u. He expanded my original post for 10.4.x for Tiger users (Tiger is 10.4.x and Leopard is 10.5.x).

Lastly if you just bought that from a user then he/she should have reformatted or provided you with a password. Plus you should NEVER buy a used computer without the original install disk provided with it. If you think about it the seller might leave all their personal stuff on the Mac/computer (that is advice for any kind of computer).


----------



## bertnspike (Apr 6, 2009)

Okay.  It's a PPC mac.  System OSX4.11.  He DID reformat and wipe and all that good stuff.  Made the admin noname and can't remember what he made the password.

I have never started any Mac and seen a place where I could enter anything like the following:
1. mount -uw /
2. sh /etc/rc
3. ls /users
4. passwd (user name)

Is this something that  only happens in single-user or verbose mode?  I understand getting there, I've just never done it.

I appreciate your help.  Thank you.


----------



## Satcomer (Apr 7, 2009)

Well follow these steps (since you have a Tiger (10.4.11) these are the steps). I will try to be right to the point. 

1. Ask the person who sold you the Mac what Username did he give the Mac when he formatted it before he sold it. This is VERY import!

2. Find the Power button.. With the other hand hold the two buttons Command (apple key) button + the letter S (at the same time) while booting up the Mac.

3. Hold down the command + s until you see a black screen with white scrolling letters. Let go of the buttons at this point.

4. At the prompt sign (where you can type) type: 
                     fsck -y

Let that run (it will run for about 5 to 10 minutes) until it reports all is well with the disk. At the point of this it will give you another typing prompt.

4. Type: mount -uw /

Then hit the 'return' button.

5. At the next prompt type: sh /etc/rc

Then hit the 'return' button.

6. At the net prompt type:  ls /users

Then hit the 'return' button.

7. At the next prompt (at this point you NEED to have the Username the person made on that Mac) type: passwd (your Username without the quotes )

At this point it should ask you to type the new password for the Username you used. It will ask to type the new password one more time to make sure it is good before it changes the password. If all goes well and the change is successful you can type: *reboot*      at any prompt to exit single-user mode and reboot the Mac into normal mode.  

Lastly at the login page you will be able to use you new password to login. If you can login go you system Preferences (in the Dock) and launch it. Choose the "Accounts" pane to change the user preferences about logging in. What ever you DON'T change the current logged in User name at any time. Just make a new Administrator account and then login to that new Account and then you can go to the same place and then delete the Username that is not yours.

I hope this helps because it the best I come up with at this time of night before bed. Good Luck.


----------



## bertnspike (Apr 7, 2009)

Non-geek-speak-computing for dummies.  Amen.  Can't thank you enough.


----------



## Graphorrhea (Aug 8, 2009)

Satcomer said:


> Read this MacOSXHint on how to reset your 10.5 password via the single user mode.



----
single user mode reset password:leopard
mount -uw /
ls /users
passwd (user's name)
(enter the password cannot be seen) 
reboot
----

Would I use this if my Admin account changes to standard? This what happened and now I can't add software, change file names, etc. It happened after I downloaded OS X 10.5.7 . Now everything is messed up for Admin account.

iMac Early 2009, OS X 10.5.7


----------



## Satcomer (Aug 8, 2009)

You have different problems! The hint was only to change an password. Unless you really messed up the instructions then something else went wrong. Do you still have the OS X install disk? If you do then do an  Archive & Install to keep your programs and fix your system problems.

Plus did you read the hint [HOWTO] Fix User lost Administrator privileges?


----------



## Graphorrhea (Aug 8, 2009)

Satcomer said:


> Read this MacOSXHint on how to reset your 10.5 password via the single user mode.





Satcomer said:


> You have different problems! The hint was only to change an password. Unless you really messed up the instructions then something else went wrong. Do you still have the OS X install disk? If you do then do an  Archive & Install to keep your programs and fix your system problems.
> 
> Plus did you read the hint [HOWTO] Fix User lost Administrator privileges?



I read the blog and wondered if that is the route I would go to fix my problem.

Do I need to use the startup disk to remedy my problem? I found instructions for that too.

I'm still confused which way to proceed.

These are the instructions:
Mac OS X 10.5: Administrator user changes to standard

Symptoms
After performing an upgrade installation (the default type) of Mac OS X 10.5 Leopard, an administrator account may change to a standard one.
Resolution
	1.	Start from your Mac OS X 10.5 Install DVD. (You do not need to install Leopard again.)
	2.	From the Utilities menu, choose Reset Password (do not choose Firmware Password Utility).
	3.	Follow the onscreen instructions *to reset the root password* (the root account is not the same as your account). Specifically: Select the name of the drive that Mac OS X is installed on, select the user named "System Administrator (root)" from the pop-up menu, type the password in the first field, re-enter the password in the second field, then click the Save button.
	4.	Restart from your Mac OS X Leopard volume.
	5.	When the login window appears, select "Other..." and log in as the root user using the password that was created above.* Note: If Mac OS X automatically logs in, choose Log Out (name) from the Apple menu to get to the login window.
	6.	Go to Accounts preferences and check (enable) "Allow user to administer this computer" for the affected user.
	7.	From the Apple menu, choose Log Out root....
	8.	Log in as the user account that had this issue. (Your account should now have administrator access.)
	9.	Use Directory Utility to disable the root user via Directory Utility's Edit menu. You may need to click the lock icon first).


Is resetting the password for the 'root' account the same as in your instructions? In other words I determine the 'root' account's password right then?


----------



## stilbite (Aug 19, 2009)

If


----------



## Brenton (Sep 4, 2009)

When I enter the command sh /etc/rc, I get stuck on this repeating message:

Sep  3 23:16:00 brenton-walters-ibook-g4 lookupd[58]: Can't load /System/Library/PrivateFrameworks/NetInfo.framework/Resources/lookupd/Agents/NI.bundle/NI

The last NI alternates with DS, and the time changes as it repeats. I can still enter commands to break up the repetition, but I when I enter the last one (passwd my username with a space) I get this:

usage: passwd [-i infosystem] [-l location] [name]
supported infosystems are:
netinfo
file
nis
opendirectory
for netinfo, location may be a domain name or server/tag
for fil, location may be a file name (/etc/master.passwd is the default)
for nis, location may be a NIS domainname
for opendirectory, location may be a directory node name

then back to the repeating line.

Edit: I just entered passwd myusername (without the space) and it returned:
Changing password for myusername.
New password:

I typed in a new password, then retyped it, and it said Sorry. I tried this multiple times, being extra-special careful. Should I just take it in?


----------



## Brenton (Sep 4, 2009)

I just tried to create a new admin in single user mode following these instructions: 
http://discussions.apple.com/thread.jspa?messageID=9581510&#9581510

and my ibook is now stuck on a blue screen. It booted up, asked me what language I preferred as if I was a new user, then started to load (spinning rainbow) and now just a blue screen. Feel free to email me to tell me I'm a moron for messing with my computer in single user. 
brentonwalters@gmail.com


----------



## co19 (Sep 6, 2009)

ahaha, we all need to screw up the first time, and it has to be frustrating. Or else everyone would be a computer genius. 
In more helpful words, have you tried inserting the OS install disk and repairing permissions?


----------



## gamemaniac (Sep 7, 2009)

Too many different answers and not sure which one could be the best and sure shot way to go.


----------



## g/re/p (Sep 7, 2009)

*Easier Version:* 
(for PPC Mac - not sure about Intel)

First, boot into single-user mode:

1. Shut down the computer if it is on.
2. Press the power button to start the computer.
3. Immediately press and hold the Command (Apple)
and the S keys until you see white text appear.

At the prompt, type *fsck -yf * and press the return key.
Type *mount -uw / * and press the return key.
Type *rm /var/db/.AppleSetupDone * and press return.

Type reboot

When the computer restarts, it should act as if you had 
just installed OS X for the first time - it will prompt you 
for information to set up an administrator level account.


----------



## Giaguara (Sep 7, 2009)

That .AppleSetupDone works on both Intel and PPC.


----------



## Brenton (Sep 8, 2009)

co19 said:


> ahaha, we all need to screw up the first time, and it has to be frustrating. Or else everyone would be a computer genius.
> In more helpful words, have you tried inserting the OS install disk and repairing permissions?


Install disk is missing. I've since taken the machine in and am having a pro look at it. I used the TechTools repair disk and it would freeze up while trying to repair the hard drive, repeatedly, at about the same point, so I'm assuming the hard drive has failed somehow. Too bad about that expired warranty...


----------



## Chas Johnson (Sep 25, 2010)

Satcomer,

Proof that good info never dies, used your solution allowing one to reset the password in single user mode without booting from the install media. 

Worked not quite like a charm, but eventually it worked like a charm.

Hanx(!)


----------



## q3000 (Oct 21, 2010)

how to get hash of the passwords?


----------



## fixr (Oct 22, 2010)

You can use a reset disk or you can use my method. It may stuff everything up though.


----------



## nikole.957 (Dec 19, 2010)

sheraz4u said:


> single user mode reset password:leopard
> mount -uw /
> ls /users
> passwd (user's name)
> ...



I'm sorry, but I don't understand you at all. I bought a used mac laptop. The person I bought it from doesn't remember the password, so I can't install any new software or make myself the administrator. What can I do


----------



## DeltaMac (Dec 19, 2010)

It doesn't really matter to you, does it? You just copied the complete post #8 in this thread so you could provide your little spammy ads...
Good luck on that!


----------



## Scrimm (Apr 22, 2011)

Satcomer said:


> Read this MacOSXHint on how to reset your 10.5 password via the single user mode.



Will this work for 10.6?


----------



## Satcomer (Apr 22, 2011)

Scrimm said:


> Will this work for 10.6?



Just use g/re/p's post on Sept. 9th (page 2) That should still work.


----------



## jmndoza (Oct 18, 2011)

You can also try this..
Boot off of the OS X CD by holding down C when booting the computer with the disk in and you can reset it in there 

or

You can probably set a new root PW by going to System Preferences> Security and clicking there in the space for changing the master (root) password. 

All you'll need is a usable login PW to make the change and you're home free.

Hope this helps in case you're unable to do anything regarding root using the CD.


----------



## DeltaMac (Oct 18, 2011)

@jmndoza:
The Master password is not related to the root user, and is only a safety backup for a FileVault password, used to unlock a FileVault account if the normal password has been lost. An admin can also use the master password to change the password on any other account.
But, other than those items, the master password (which is not a user account) does not have the power of the root user.


----------



## nany2204 (Nov 12, 2011)

All you'll need is a usable login PW to make the change and you're home free.


----------



## nany2204 (Nov 12, 2011)

Thank you !!!!!!!!!!!!


----------



## DeltaMac (Nov 12, 2011)

@ nany2204
Are you thanking yourself for providing a handy spam link - or is it for copying text verbatim from a previous post?


----------



## ElDiabloConCaca (Nov 12, 2011)

If they don't make any sense, or have a single-digit number of posts with links in them, reputation minus one to warn the others.  Let's turn that progress bar as red and as long as it will go for these undesirables.

Take a look here:

http://macosx.com/forums/software-programming-web-scripting/318398-outlook-pst-repair.html

Four idiot Windows crapware spammers, all talking to themselves, wholly contained in a single thread.  Genius!


----------



## DeltaMac (Nov 12, 2011)

I saw that! LOL
It reminds me of putting two of those toys that respond to your conversation near each other, and the toys talk to each other... Wait, that's a little weird and scary, eh?
OTOH, not too different from your thread, either


----------



## Red Rover (Jan 18, 2012)

I have tried and failed to boot into single user mode on a 12 inch iBook G4. I press the power button while holding command+s, hear a chime, the screen flickers and then stays black. I have held the command+s for 5 minutes and still nothing happens.
 Any suggestions on what might be causing this?
I am running OS X 10.4.11


----------



## Red Rover (Jan 20, 2012)

Any help at all would be really appreciated. My girlfriend has given me her old Ibook G4 as she is now on Powerbook and we do not know her password so any assistance on this query would be extremely helpful.  I am an old-school PC man who is getting into the realm of MAC. I need to try and upload new software apps and the password block is preventing me from experiencing the joy of mac.


----------



## Satcomer (Jan 20, 2012)

Red Rover said:


> Any help at all would be really appreciated. My girlfriend has given me her old Ibook G4 as she is now on Powerbook and we do not know her password so any assistance on this query would be extremely helpful.  I am an old-school PC man who is getting into the realm of MAC. I need to try and upload new software apps and the password block is preventing me from experiencing the joy of mac.



Have you read this thread from the beginning?


----------



## Apple Summers (Feb 22, 2012)

I feel like a complete fool... I changed my admin password on my Mac Lion 10.7.3 version, and after it was successfully changed, I typed the new pw just to see if it worked,  but it didn't accept it. I must have pressed a different key then I meant to by accident when filling in my new pw. I searched everywhere and tried different code options in terminal, but unfortunately no luck. I am thinking maybe it's because I have the latest Lion version installed. I know you can reset using Apple ID but unfortunately I hadn't enabled that option previously. I can still use my mac since I am logged in (just won't be turning it off until I can find a way to reset the pw). Any help will be greatly appreciated. 
A frustrated newbie member...


----------



## DeltaMac (Feb 22, 2012)

You can reset a forgotten admin password by rebooting to the Lion Recovery partition. Here's more info about that: http://www.cultofmac.com/111456/discover-the-hidden-password-reset-tool-in-lion-os-x-tips/


----------



## Satcomer (Mar 13, 2012)

I can't believe this thread is still going!


----------



## New (Apr 18, 2012)

I recently got a used mac os x. i know the administrator is jackthecountryman from what i seen. there is also another user and the computer is always logged into this account . as you know i cannot connect to internet, ect without the mac needing the users password. i tried to change the password without the software, but i must be doing something wrong. when i get to passwd then enter the users name. it does nothing. it says command not found. 
can i purchase the software if so how much, or will the software work with this certain computer. it should i just want to make sure, i go about it the right way the first time.
can i download the software, and burn it onto a cd 
i know there is something i am missing. If so please help i am very new to this. The last time i used a mac was in 2008 for college and it was learning purposes. There was no figuring out passwords and such. THANKS


----------



## Satcomer (Apr 18, 2012)

New said:


> I recently got a used mac os x. i know the administrator is jackthecountryman from what i seen. there is also another user and the computer is always logged into this account . as you know i cannot connect to internet, ect without the mac needing the users password. i tried to change the password without the software, but i must be doing something wrong. when i get to passwd then enter the users name. it does nothing. it says command not found.
> can i purchase the software if so how much, or will the software work with this certain computer. it should i just want to make sure, i go about it the right way the first time.
> can i download the software, and burn it onto a cd
> i know there is something i am missing. If so please help i am very new to this. The last time i used a mac was in 2008 for college and it was learning purposes. There was no figuring out passwords and such. THANKS



See g/re/p's post on page 3, Sept7, 2009 because his post will cover most all bases to reset a password on an OS X Mac.


----------



## Satcomer (Nov 14, 2012)

An Update! In Mountain Lion (10.8.x) to reset a password follow the steps in the article How to reset a login password. Again you can only do it this way IF you don't have a Firmware password setup.


----------



## DeltaMac (Nov 14, 2012)

Not quite accurate... The password reset method in that article is for either Lion or Mountain Lion.
If you are not going to use the Single User method, you have to be able to boot to another drive or partition, in any case.
The presence (or lack) of a firmware password makes no difference - unless you don't know what that firmware password is.
One of the previous posts mentions changing the RAM configuration as part of the means to reset a firmware password. That solution can not possibly work on Macs sold within the last year or so. If you have a newer Mac, you have to call Apple (or your authorized service tech has to call Apple) as the procedure is now more complex (and a more secure way to - eh - secure your Mac).
Good info here: http://reviews.cnet.com/8301-13727_7-57542601-263/efi-firmware-protection-locks-down-newer-macs/


----------



## magaretz (Oct 26, 2015)

whisky1980 said:


> says command not found when i type passwd somebody please help..!


You have to set the path in /usr/bin


----------



## David Mark (Nov 28, 2016)

Nice information shared by all.


----------



## Paommtere (Apr 27, 2017)

My phone is always stuck in operation , then i have to try to reset,  only in this way can I restart the phone


----------



## DeltaMac (Apr 27, 2017)

Paommtere said:


> My phone is always stuck in operation , then i have to try to reset,  only in this way can I restart the phone


Thanks for the info, but this thread is about password reset in macOS, so not related to iOS or iPhones in this case.
You should post your question in the area for iPhone help.


----------



## Manshu Ydoxy (May 7, 2017)

Excellent tips and good answers..


----------

