MacOS
From Leo's Notes
Last edited on 12 September 2019, at 04:44.
Password Reset
I was frustrated for over an hour trying to get into single user mode on a mac which was running under VMware. Supposedly, you're suppose to hit ⌘-S while it is booting in order to get into the rescue mode. However, this doesn't seem to work, at least on my PC keyboard (I tried hitting Win-S and Alt-S) through VMware Workstation 8.
Instead, try:
- Restarting the VM
- hitting F8 while booting Darwin/x86.
- At the boot menu, select the hard disk option (h)
- Specify the boot parameter '-s' for single user (just like linux)
That should boot you into single user mode, allowing you to reset your password amongst other things.
To reset a password:
# umount -uw /
# launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
# dscl . -passwd /Users/username password
## You may see an error, but it should be fine.
# reboot