Your Apple ID password is not the same as the OS X user password you need to make changes such as installing software. If you've lost track of your OS X password:
- Turn off your Mac (choose Apple > Shut Down).
- Press the power button while holding down Command-R. The Mac will boot into Recovery mode. ...
- Select Disk Utility and press Continue.
- Choose Utilities > Terminal.
- Enter resetpassword (all one word, lowercase letters) and press Return.
(Instructions pasted from Macworld.co.uk)