Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently I was given a MacBook Pro (late 2010 I believe), and asked to see if I could reset the password for it. I assumed that it would be relatively easy so decided to go ahead and give it a go. I booted into SUM, mounted the hard drive and deleted /var/db/.applesetupdone before restarting the computer (using reboot, not manually so as far as I can tell no reason for anything to get corrupted).

When I restarted the computer I got the usual apple install screen (it appears to be running OS X Leopard, perhaps Snow Leopard, I can't really tell from the install screen). I follow all the steps through, till I get to the create first user page.

After submitting it the "Creating account" loading indicator appears. The computer screen goes black, and it goes straight back to the language selection option (the first screen you see).

What am I doing wrong, and what should I do to fix it?


Edit: Here are the commands I used, in order:

# /sbin/mount -uw /
# rm /var/db/.applesetupdone
# reboot
share|improve this question

1 Answer 1

up vote 2 down vote accepted

I'm not sure what could have been done wrong, but if you want to reset the password from the single user mode command line, follow these steps:

# mount -uw /
# touch /var/db/.applesetupdone
# launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
# dscl . passwd /Users/username thepassword
# reboot

Where username is the shortname of the user and thepassword is the desired password.

share|improve this answer
    
I'm getting launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.opendirectoryd.plist"): No such file or directory –  Benedict Lewis Jan 9 at 13:41
    
Oh, I see that this is Snow Leopard. Try /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist and /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist –  boneyjellyfish Jan 9 at 13:44
    
Great, works now. I actually found out about DiretoryServicesLocal earlier when I ran dscl without it. –  Benedict Lewis Jan 9 at 13:57

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.