Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently changed my password and promptly forgot it :P What is the best option for resetting it? I can still access the mac via SSH (ssh key auth method), can I do anything with that?

share|improve this question
Try this:… - Google is our friend :D – Scott S Jul 5 '12 at 13:17
My preference is to boot to single user mode and make a new admin account. You'll need access to the mac locally either way unless you happen to have access to a second admin account. Then you can use sudo to overwrite the "lost" password. – bmike Jul 5 '12 at 15:21

No - the typical ways to reset a password or delete the file that lets the Mac reboot to the setup assistant where it lets you create a new admin user that will have a known password all require you to know a working user/password combination that works for sudo.

You'll want to boot to the Recovery HD or install media or into single user mode to make a new admin user (which can be deleted once you've reset your password) or use the normal OSX procedure to reset your password.

share|improve this answer

If you are an administrative user (or can login as one on the shell prompt), you should be able to use sudo passwd USER to change the password.

share|improve this answer
No, that requires the old password. Unless you can run it as root, which he can't. – Harald Hanche-Olsen Jul 5 '12 at 14:20
sudo should be enough, of course this still requires him to be logged in as an admin user (or to be able to ssh into an admin account). – patrix Jul 5 '12 at 16:42
thanks patrix, that did it on my ML 10.8 machine. i was working remote on a mac and the screen saver kicked in, and all i have is the password box. used to be able to put in admin username/pwd but not anymore, i think it changed in 10.7(?) I was able to ssh and use admin creds to sudo pwd change and then use ARD to unlock screen. thanks again! – user49980 May 24 '13 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.