SOLVED Reset Password

Joined
Sep 23, 2014
Messages
13
Reaction score
0
I am new to the Forum, but I have a problem. I set the administrator password and now don't have the right combination. Is there a way to reset the password if you have forgotten it? I saw in some posting here something about Cammand + S.

Please help. At least I haven't shut down, so I still have access to things.

George
 
Joined
Sep 17, 2014
Messages
4,854
Reaction score
241
The first thing you need to tell us is what Mac OS are you using? Snow Leopard, Lion, Mountain Lion, and Mavericks are the most recent ones.

Secondly, if you do not have any installer DVDs, the Command+S "method" only works with Leopard or earlier. However, this method does not let you reset the password. It lets you create a new user account I(like you did when you first got your machine), and then you create a password (write it down somewhere safe, just in case you need it again!).

If you happen to know the short name of the user name, then you could do it via Terminal. Since your machine is still on, here is the way to do that:

"Reset Admin Password Using The Terminal
You can reset the password by printing out (or writing down) and carefully following these steps.

First, find the short name of the admin user on the machine. The easiest way of doing this is by looking at what the directory is called in the Users folder.

Now, start in Single-user Mode. It should boot into a command line.

Enter these exact lines. Press RETURN after each.

mount -uw /
ifconfig lo0 up
cd /var/db/netinfo
netinfod -s local

Now you'll need that short name. Enter "passwd", a space, and the short name of the admin. For example, if the admin was rather prosaically called "imadmin", you would enter "passwd imadmin".

The computer will now prompt you to change the password for "lmadmin" (or whatever the short name was). Go ahead and enter a new password.

Now, enter:

sync
reboot

and the machine will reboot. The admin password should now be changed."

Note that it says CAREFULLY, and that you must enter those terminal commands EXACTLY like it says, and to press RETURN after EACH such command.
 
Joined
Sep 17, 2014
Messages
4,854
Reaction score
241
Hi and welcome,




For resetting your admin password if you have forgotten it have a look here at Apple support.;)
http://support.apple.com/kb/PH6317
Hi honestone,

You just got in before me.:)

Good link! But, note that is for OS 10.6. Also, one needs the installer DVDs to do something similar for other OSs. Since he still has his machine on, he should be able to get his short admin user name, and then follow the steps I provided. As long as the op is careful, that method will be much quicker than using installation DVDs (assuming he still has them). I myself am on Mavericks, and have no Install DVDs. Instead, I have 4 copies of the Install Mavericks file. If I needed to reset my admin password (I'm going to get it now and write it down someplace!), I would reboot my machine from a Super Duper Backup on either of my two external drives, and then launch the file Install Mavericks.
 
Joined
Nov 14, 2012
Messages
2,241
Reaction score
100
Hi honestone,

I to am on Mav, but tend to forget some times that people do or have not made a bootable USB stick etc from the installer, it was the mention of command S that made me think it was an older OS X like SL.
 
Joined
Sep 17, 2014
Messages
4,854
Reaction score
241
Hi honestone,

I to am on Mav, but tend to forget some times that people do or have not made a bootable USB stick etc from the installer.

Understand. That is why it is SO, SO IMPORTANT to have a bootable backup on an external hard drive. The easiest (and free!) way to do this is via the excellent program Super Duper. That guy has save d my "bacon" a couple of times.

Also, it's important to remember to make a copy of that Install Mavericks on another directory, as that file gets deleted after one uses it.
 
Joined
Sep 23, 2014
Messages
13
Reaction score
0
Thanks honestone and old scribe for responding to my plea for help. First I am on MAC OS X 10.7.5 (Lion). I had been a PC user for decades and switched to Mac a couple of years ago. I used to have some technical knowledge, but that is all in the past. Also being 76 years old, I am a little slower and, as you know, a little forgetful. So I need to write things down and not rely on memory. Also I will heed warnings to back up.

I don't recall getting an install disk. The only ones I could find are for my Dell Laptop, so I need to use the "terminal" method. So, first thing is "What is Single-user Mode" and how do I get there?
 
Joined
Sep 23, 2014
Messages
13
Reaction score
0
OK, I looked up single-user Mode and it seems I have to shut down and restart to enter it. That's kind of scary. Then I'm SOL if I can't get it restarted.
 
Joined
Nov 14, 2012
Messages
2,241
Reaction score
100
Hi,

As honestone says single. User mode is needed, yes seems a little scary but you should then get a screen with writing on it, let us know how you get on.
 
Joined
Sep 23, 2014
Messages
13
Reaction score
0
OK. I went to Single-user Mode. Typed in the commands indicated, but got some error messages. When I typed in "cd/var/db/netinfo" got the message "no such file or directory found". Since that instruction failed, the next one "netinfod -s local" returned "command not found". So I typed in "Reboot" and the system actually was able to come up without my need for the password. I still need to get the password or get it changed so that I can perform other administrative tasks, such as apply updates. Suggestions?
 
Joined
Nov 14, 2012
Messages
2,241
Reaction score
100
Hi,

Two possibilities,

(a) Reset password using Lion Recovery


  1. Shut down your Mac and turn it back on while holding down the Command and R keys at the same time until you see the Lion Recovery screen.
  2. From the menu bar at the top, select Utilities > Terminal.
  3. In the Terminal window type resetpassword and press Enter.
  4. Use the Reset Password utility to select your hard drive, choose your user account, and enter a new password.
(B) Reset Lion password with Single User mode
  1. Shut down your Mac and turn it back on while holding down the Command and S keys at the same time until your see a black screen with white text. This is known as Single User mode.
  2. You can skip this step, but it’s recommended that you don’t because it will check the consistency of your hard drive. At the prompt, type fsck -fy and press Enter.
  3. Once the disk check is complete and the prompt returns, type mount -uw / and press Enter.
  4. Type launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plistand press Enter.
  5. Type ls /Users and press Enter. All of the usernames on the computer will be listed, which is helpful if you don’t know or remember what these are.
  6. 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 Enter. You will likely get an error message about a file or directory not being found – it’s safe to ignore this.
  7. Type reboot and press Enter.
 
Joined
Sep 17, 2014
Messages
4,854
Reaction score
241
OK. I went to Single-user Mode. Typed in the commands indicated, but got some error messages. When I typed in "cd/var/db/netinfo" got the message "no such file or directory found". Since that instruction failed, the next one "netinfod -s local" returned "command not found". So I typed in "Reboot" and the system actually was able to come up without my need for the password. I still need to get the password or get it changed so that I can perform other administrative tasks, such as apply updates. Suggestions?

Sorry those commands did not work. I have not actually tried those, but for some reason, they seem to be problematic.

For the method on part B of oldscribe's post above, I actually also saw that via my google search. Hopefully, it will work.

By the way, here is a link to a "pictorial", step by step description of what oldscribe stated above (just click on it with your mouse):

http://www.wikihow.com/Reset-a-Lost-Admin-Password-on-Mac-OS-X

(Start at the Method 2 part of that)

Being optimistic, after you successfully reset your password, please, please do the following:

1. Write it down, and keep it in a "safe" place.

2. Hopefully, you have an external hard drive. If you don't, get one as soon as possible! Then, download the "free" version of the excellent backup/cloning program SuperDuper!. Execute it, so that you have an exact, bootable copy of what is on your internal drive now. You should then run SuperDuper as often as feasible, to have a recent backup, in case you have issues with your system on your internal drive. (I myself run it once a week for both of my machines, as part of my maintenance/backup processing).

As for original Lion DVDs, did you get your Mac brand new (by the way, what model Mac do you have?)? If you did, then you should have gotten original Lion DVDs.
 
Last edited:
Joined
Sep 23, 2014
Messages
13
Reaction score
0
Success. I used method a: Lion Recovery. I also had to mess with the Keychain password, but managed to get that working. Thank you for your help and suggestion. It's nice to have some experienced folks out there willing to help out.
 
Joined
Sep 17, 2014
Messages
4,854
Reaction score
241
Success. I used method a: Lion Recovery. I also had to mess with the Keychain password, but managed to get that working. Thank you for your help and suggestion. It's nice to have some experienced folks out there willing to help out.

Way to go!!!! I would suggest you print out that post by oldscribe that contained both methods (just copy and paste it into a Word (or similar word processing program) document, and print it out). Then, save it somewhere. In fact, maybe write your admin password (new one) on it.

To oldscrbe: Way to go on that first (and looks like easier) method!!!!
 
Joined
Nov 14, 2012
Messages
2,241
Reaction score
100
Hi George,

Very pleased to hear all is well now, & you are most welcome.:)

Hi honestone,

Again you have tought me a lesson never to assume things.:(;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top