I'm trying to export private keys from Keychains application and getting error.

You failed to provide the necessary administrator authorization.


Open keychains, in My Certificates - login found my keypair, right click on private one, Export as p12 on desktop, specify Fine password - error!

  • Which steps are you following to export private keys? – kiamlaluno Jun 22 '10 at 13:15
  • @kiamlaluno: updated. thx – Pablo Jun 22 '10 at 13:56

I exported two private keys following the steps you reported, and I was able to export it both the times.

From the reported error, it seems that you entered the wrong password when Keychain Access asked you the "login" keychain password. I entered the administrator password (the account I used in the test is an account that is allowed to administer my Mac), and I didn't get any error message. By a coincidence, I used the administrative password even when I was asked for a password the first time; I don't think that makes any difference.

  • I am not asked for administrator password, only for key encryption password. – Pablo Jun 22 '10 at 23:23
  • The only case when I was not asked for the administration password is when I selected to always allow the exporting of a specific private key. I am not sure if there is a way to tell Mac to forget all the times you selected "always allow" to that dialog box; if I would know how to do it, I would suggest you to try that. – kiamlaluno Jun 23 '10 at 1:18
  • @kiamlaluno: Thanks. The problem still actual, looking for solution. – Pablo Jun 23 '10 at 1:44
  • @Michael: Did you try with different private keys? Do you see the dialog box asking for the "login" password? Did you try with a freshly installed certificate? Are you using an account that is allowed to administer your Mac? Did you change the password of your account, lately? – kiamlaluno Jun 23 '10 at 2:00
  • @kiamlaluno: No I have just 1 private key so far. Dialog box is asking "Password for exporting the key". My account is administrative. It is freshly installed actually. The password is same for ages.. Anyway, I've found some temporary solution for now to export from terminal using security export .... Mistery. – Pablo Jun 23 '10 at 2:11

I had the same, but something was totally messed up and I'm still not sure what caused it.

For one thing, I had somewhere in the process clicked 'always allow' and entered the wrong password. It never asked me for a password afterwards, and kept insisting I failed. Miserably.

Anyway, after I had clicked the lock to 'lock the login keychain' it suddenly started asking for the password again. Then it worked.

  • 1
    I would highlight the phrase after I had clicked the lock to 'lock the login keychain' it suddenly started asking for the password again... and magically started storing passwords again. – I.G. Pascual Mar 7 '18 at 11:00

I'm on Mac OS X 10.6 on a Mac Mini server.

While exporting a private key, the error I get is:

An error has occurred. Unable to export an item. You failed to provide the necessary administrator authorization.


In order to export a private key out of the Keychain it is critical that you reboot the server and log in as root.

  • ID: root
  • Password: your administrator password

Proceed to Keychain Access and select your Keychain (like "System") and unlock it using root and your administrator password.

Now export as usual.

  • If that works, you could also start the keychain access application using sudo from the command line. but it didnt help for me. – commonpike Oct 21 '14 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.