How to reset/hack Mac password.

For certain versions the easiest way is to use the Installer CD method.

However, if you don't have an installer CD you can do some command-line tricks instead.
Boot up the computer, holding Command+S as you hear the startup chime.
The Mac will boot into single user mode, giving you a command prompt after loading everything up.

If the Mac is running Snow Leopard or below, type the following commands, hitting Enter after each one and waiting for the prompt to come up again before running the next one:

/sbin/fsck -fy
/sbin/mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . -passwd /Users/

If the Mac is running Lion or above, you'll instead want to use the following commands:
/sbin/fsck -fy
/sbin/mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
dscl . -passwd /Users/

Replace with the user whose account you want to access and
with the new password you want to assign to that user. If you get
an error message about com.apple.DirectoryServicesLocal.plist on a
Lion or Mountain Lion machine, just ignore it, the password reset should still work.

If you don't know the user's username, it should be pretty easy to run ls /Users at any time during single user mode to list all the home folders
on the Mac, which usually correspond to the usernames available on the Mac. Note that the user's password is different than the root password. If you want access to the more secured parts of their machine—like their password keychain—you can change their root password by running this commandafter loading opendirectoryd.plist:
passwd root

Once finished, you should have access to most of their system, including their saved passwords for other apps.