PDA

View Full Version : Single User Mode PW Reset: 10.7 Lion




nelz886
Jul 27, 2011, 08:52 PM
Previously in 10.5/10.6 to reset a user's password in single-user mode one would have to type this:
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /Users/SHORTNAMEGOESHERE newpasswordhere

Nice, but this doesn't work in 10.7 Lion. In addition, you are prevented from changing the root password in single-user mode.

Do this in 10.7 Lion; boot into single-user mode and type:
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
^ after typing this, you may now use 'passwd root' to change the root password

Now you can continue reseting the user's password:
dscl . passwd /Users/bob bobsnewpassword

** You may see an error message that states com.apple.DirectoryServices.plist cannot be found; ignore this in Lion.



macmba
Aug 10, 2011, 12:54 PM
Actually... you can just:

mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
passwd <username>

It works.

nelz886
Sep 3, 2011, 10:21 AM
Actually... you can just:

mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
passwd <username>

It works.

This works in Snow Leopard, not in Lion. com.apple.DirectoryServices.plist was removed in Lion

mrapplegate
Sep 3, 2011, 02:09 PM
Try this. Read the comments for added suggestions.


http://hints.macworld.com/article.php?story=20110727063028750


Apple has removed the utility to reset a password and restore a user's folder permissions from the Recovery HD. If you need it, you have to open Terminal (from the Recovery HD Utility menu) and type:

resetpassword

Then the old Reset Password application opens.

By the way the old hint to reset a user password by booting in single user mode is no longer working: the file /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist no longer exists.

nelz886
Sep 6, 2011, 03:15 PM
Right. I provided instructions on how to reset the password via Single-User mode in Lion.

dvot
Sep 18, 2011, 03:36 PM
@ nelz886

I followed your instructions, but I get the following error message after entering new root password (repeated twice), "Could not verify credentials because the directory server does not support the requested authentication method"

Any other tips?

fernandojulian
Feb 12, 2014, 09:43 AM
My friends i used:



mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /Users/SHORTNAMEGOESHERE newpasswordhere
su <user>
passwd <user>
old Pass:<same a new>
new pass: <same a old>
retype: <same a old>

and ok ! jejejeje