View Full Version : [HOWTO] Reset User Password via single user mode
Satcomer
April 23rd, 2008, 11:40 PM
Read this MacOSXHint (http://www.macosxhints.com/article.php?story=20080414140636495) on how to reset your 10.5 password via the single user mode (http://support.apple.com/kb/HT1492).
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
5. Type dscl . -passwd /Users/username password, replacing username with the targeted user and password with the desired password.
6.Reboot
This allows you to reset the password in single user mode without booting from the install media.
g/re/p
July 26th, 2008, 11:46 PM
Cool hack! And one more reason to block single user mode by setting a firmware password if you use a mac at work!
dbash
August 26th, 2008, 03:32 PM
Thank you very much, but when I boot I hear the chime and then nothing but a black screen.
whisky1980
August 27th, 2008, 09:29 AM
says command not found when i type passwd somebody please help..!
nixgeek
August 27th, 2008, 09:45 AM
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
February 10th, 2009, 03:29 PM
instead of typing
dscl . -passwd /Users/username password
just type
passwd /Users/username password
thats what worked for me.
sheraz4u
February 24th, 2009, 01:41 PM
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
April 5th, 2009, 06:23 PM
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)
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
April 6th, 2009, 04:43 AM
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 (http://support.apple.com/kb/HT1492)? 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
April 6th, 2009, 11:19 PM
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
April 7th, 2009, 10:17 PM
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
April 8th, 2009, 12:17 AM
Non-geek-speak-computing for dummies. Amen. Can't thank you enough.
Graphorrhea
August 8th, 2009, 06:36 AM
Read this MacOSXHint (http://www.macosxhints.com/article.php?story=20080414140636495) on how to reset your 10.5 password via the single user mode (http://support.apple.com/kb/HT1492).
----
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
August 8th, 2009, 10:40 AM
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 (http://support.apple.com/kb/HT1710) to keep your programs and fix your system problems.
Plus did you read the hint [HOWTO] Fix User lost Administrator privileges (http://macosx.com/forums/howto-faqs/299801-howto-fix-user-lost-administrator-privileges.html)?
Graphorrhea
August 8th, 2009, 06:28 PM
Read this MacOSXHint (http://www.macosxhints.com/article.php?story=20080414140636495) on how to reset your 10.5 password via the single user mode (http://support.apple.com/kb/HT1492).
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 (http://support.apple.com/kb/HT1710) to keep your programs and fix your system problems.
Plus did you read the hint [HOWTO] Fix User lost Administrator privileges (http://macosx.com/forums/howto-faqs/299801-howto-fix-user-lost-administrator-privileges.html)?
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
August 19th, 2009, 01:38 PM
If
Brenton
September 4th, 2009, 02:35 AM
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
September 4th, 2009, 03:18 AM
I just tried to create a new admin in single user mode following these instructions:
http://discussions.apple.com/thread.jspa?messageID=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
September 6th, 2009, 10:58 PM
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
September 7th, 2009, 02:00 AM
Too many different answers and not sure which one could be the best and sure shot way to go.
g/re/p
September 7th, 2009, 02:17 AM
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
September 7th, 2009, 04:06 PM
That .AppleSetupDone works on both Intel and PPC.
Brenton
September 8th, 2009, 01:27 PM
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...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.3.0 RC1