How to solve "cannot open password prompt from OS X preferences"

For unknown reason I went into problems with my OS X installation. Whenever I needed to change some system preferences (like allowing the apps to control the computer), the password prompt window after clicking the lock button hasn't appeared. After spending a lot of time on forums and typing a lot of commands to to terminal without success I've found the solution is pretty easy.

So if you have the same problem and couldn't get to open the password prompt from OS X Preferences or during the installation of new software, try this steps.

  1. Cmd+Space, open Spotlight and type Keychain Access
  2. In this app click Keychain Access menu item and then Keychain First Aid
  3. The new window will appear. Select Verify option and click Start button
  4. It is likely possible the Keychain will find a problem
  5. Then choose the Repair option and after clicking the Start button solve the problem

I do not guarantee this could help at 100%. But in my case it helped.