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?
Asked
Active
Viewed 4,349 times
3
-
2Try this: http://osxdaily.com/2010/08/10/forgot-mac-password-how-to-reset-mac-password/ - Google is our friend :D – Scott Stevens Jul 05 '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 05 '12 at 15:21
2 Answers
1
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.
-1
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.
nohillside
- 100,768
pcm
- 159
-
2No, that requires the old password. Unless you can run it as root, which he can't. – Harald Hanche-Olsen Jul 05 '12 at 14:20
-
sudoshould 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). – nohillside Jul 05 '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! – May 24 '13 at 17:19