Tech, Gadgets, Photography, Social Media and Poor Spelling

Change the Password in Mac OS X 10.7 Lion Without Knowing the Current Password

Change the Password in Mac OS X 10.7 Lion Without Knowing the Current Password

Change password of current user in Mac OS X LionThere are a few ways to reset a password in Mac OS X 10.7but both of those methods require reboots. This approach is different, it lets you change the password of the user currently logged into Mac OS X Lionwithout knowing the user password, and without a reboot:

  • Launch the Terminal, located in /Applications/Utilities/
  • Type ‘whoami’ at the command line to get the current users precise login name, which will look something like this:
  • $ whoami

  • Type the following command, replacing ‘username’ at the end with the exact current users login name that you retrieved from whoami:
  • dscl localhost -passwd /Search/Users/username

  • Enter the new password once, hit return, and confirm the new password again hitting return

The password is now changed.

No authentication is required, you simply enter the new password and confirm the changed password. This is much easier than the manual reset methods and it doesn’t require a reboot or any manipulation of user data in Mac OS X.

Remember that like anything else in the command line, capitalization matters, so if the username is reported back as “Will” that would be different than “will” – be sure to use the proper caps for the password to be changed.

This tip is undeniably useful for a wide variety of situations pertaining to system administration,troubleshooting, and theft recovery, but could also post a potential security risk. Regarding the security risk, it’s realistic to assume that if someone has a computer in their possession, little is safe unless the drive itself is encrypted.

This trick was included in a broader and more mischievous tip that we’ll stay away from, nonetheless thanks to Daniel for sending this in!

Update: Additional reports and comments are suggesting this is a bug in OS X Lion, if so we could expect a Security Update to Mac OS 10.7 in the near future that would remove the ability to run dscl without administrative authentication. We’ll keep you posted.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


This entry was posted on September 19, 2011 by in link and tagged , , , , , , .
%d bloggers like this: