Mac: With the release of OS X, Apple introduced the ability to link your Apple ID to your Mac's local user account. As The Instructional points out, this way, if you forget your password, you can retrieve it without needing someone's assistance or OS X Recovery.
All you need to do to set this up is head into System Preferences > Users & Groups. Select your user account, and click "Set" next to the Apple ID line. Then, make sure the "Allow user to reset password using Apple ID" box is checked. Now, if you need to reset your Mac's password at any point, you can use your Apple ID as authentication.
Reset Your OS X Password Using Your Apple ID [The Instructional]