Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

My sister bought a used MacBook about 6 months ago and she has lost her password.

Here is the procedure I tried to use to reset the password:

  1. Boot into single user mode (press Command-S at power on)
  2. Type fsck -fy
  3. Type mount -uw /
  4. Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
  5. Type dscl . -passwd /Users/username password, replacing username with the targeted user and password with the desired password.
  6. Reboot

But when I try the step 4, it says launch_msg(): Socket is not connected.

I would like to know what command to enter in the single user mode to know what version the Macbook is running and the right command to reset the password. Thank you.

share|improve this question

2 Answers

up vote 0 down vote accepted

Once you mount the file system, you should be able to use passwd username and then put in the password twice.

share|improve this answer
You recommand those steps : 1. Type fsck -fy 2. Type mount -uw / 3. Type passwd username Is there a way to know the user name ? I'm not sure if I should enter the space from the main screen name... – Alexandre Aug 24 '12 at 17:06
If I remember right I tried that also yesterday and the system was asking me to enter launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist first :( – Alexandre Aug 24 '12 at 17:08
You can do an ls /Users/ and view the users list there. – Bo Shubinsky Aug 24 '12 at 17:14
Thanks a lot ! I was typing Is* instead of ls. (*Capital i) – Alexandre Aug 24 '12 at 17:29
It's an l so it'd be LS if in all caps – Bo Shubinsky Aug 24 '12 at 18:11
show 1 more comment

Try loading com.apple.opendirectoryd.plist instead. See this answer and the comments at 10.7: Reset Password - Mac OS X Hints.

  1. Hold ⌘S on startup
  2. mount -uw / (fsck -fy is not needed)
  3. launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist (or /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6 and earlier)
  4. dscl . passwd /Users/username (without a trailing slash) and enter a new password. You can ignore the error about com.apple.DirectoryServices.plist.
  5. reboot
share|improve this answer
Thanks, it worked on Mountain Lion! :D – Nimbuz Dec 3 '12 at 18:15

Your Answer

 
discard

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.