For those odd times where you need to reset the password for a user on a Mac (OS X 10.5 Leopard) and you don’t have access to the / an administrator account, this is a procedure that will work if you have physical access to the system and can reboot it. No boot DVD is needed if you can boot the system off the internal hard disk.
We boot into single user mode off the internal hard disk, then reset the target user password.
- Boot into single user mode (press Command-S at power on)
- Check the root filesystem first
fsck -fy
- Mount up the root filesystem
mount -uw /
- Load system directory services
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
- Edit user information
dscl . -passwd /Users/username password
(replace username with the targeted user and password with the new password) - Reboot then sign in with the new password.
reboot