Subscribe to MacYourself via RSSSubscribe to MacYourself via EmailFollow MacYourself on Twitter
Apple Products and Accessories from Amazon.com

How to reset password for Mac OS X 10.7 Lion

How to reset password for Mac OS X 10.7 Lion

One of the most common questions Mac users ask is, “How do I reset my Mac’s password?” If you’re using Mac OS X 10.7 Lion, there are a couple ways you can go about it – and they’re both pretty easy to do.

MacYourself previously published a popular article explaining how to reset the password on Macs running 10.4, 10.5 and 10.6. Unfortunately, those methods no longer work in 10.7 Lion. That doesn’t mean you’re out of luck – there are new ways to reset a password in Lion.

As mentioned in our original article, it’s important to remember that anyone with physical access to your computer (whether it is a Mac, Windows or Linux) can eventually find a way in. There’s no such thing as complete security if someone who knows what they’re doing is sitting in front of your computer. If you’re truly concerned about the security of your files, you should look into using FileVault to encrypt them.

Reset password using Lion Recovery

If you bought a brand new Mac with Lion pre-installed, the hard drive includes with a recovery partition that gives you access to a bunch of different tools. Here’s how to take advantage of this utility to reset your Mac’s password:

  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.

Reset Lion password with Single User mode

Anyone running Mac OS X Lion can take advantage of this method:

  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.plist and 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.
Tags: , ,

12 Comments Have Been Posted (Leave Your Response)

man… you’ve saved my my life… thanks for this!

i cant do anything with the first option it appears a big lock and ask me for a password. and the second the solomode doesnt enter..

This might have helped, but I’m not sure because when restarting, it only gets as far as the apple picture and the turning thing under it. This might be due to a couple of commands I have tried before, but I don’t know for sure.

this doesnt work for me, ive tried both. ive switch it off completely & restarted then trying both cmd&R & cmd&S non work, just takes longer to come on before bringing up the ‘password’ box again asking me for it.

please help. i have all my uni work on my laptop & i cant find my discs so i desperately need this to work for me!

Thank you soooo much!!!! Couldn’t believe how easy this was

Thanks, worked a treat

Does this work on older OS X systems (Leopard etc.)
Tried it on my Lion and worked a treat, but I need to change an old 10.5 password and it would be easier to use this as I can remember it.

it do not work. After launchctl load, it say …socket is not connected….i need help….anybody………….

Thanks, it worked great. It took me to the initial login and first st up screen and the I just followed the registration steps and now everything is working fine.

Worked like a charm on our mini Mac (Lion)! Thank you!

Woooooo / Thanks a lot!!

not working for me i hold down both command + r
then i get a lock and I don’t know what the password is i use the one that i use to log into my computer but that don’t do nothing I don’t recall setting up a certain password to get into the hd recovery anyone can help that would be great THANK’S

Have Something To Say? Join The Discussion!

  (required)
  (required; will be kept private)
  (optional)