da easiest method would be to use Ophcrack on this, also, as it works with Mac and Linux in addition to Windows. However, there are other methods that can be used, as demonstrated below.
Choose a new password and then use that to log in.
If the Mac runs OS X 10.5, restart the computer and press COMMAND + S. When
at the prompt, type:
fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . -passwd /Users/UserName newpassword
That’s it. Now that the password is reset, you can login. \m/