Exporting keychain: You failed to provide the necessary administrator authorization

4

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

You failed to provide the necessary administrator authorization.

UPD:

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

Pablo

Posted 2010-06-22T13:13:37.423

Reputation: 4 093

Which steps are you following to export private keys? – kiamlaluno – 2010-06-22T13:15:38.563

@kiamlaluno: updated. thx – Pablo – 2010-06-22T13:56:28.943

Answers

3

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

From the reported error, it seems 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.

kiamlaluno

Posted 2010-06-22T13:13:37.423

Reputation: 1 390

I am not asked for administrator password, only for key encryption password. – Pablo – 2010-06-22T23:23:49.833

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 – 2010-06-23T01:18:49.403

@kiamlaluno: Thanks. The problem still actual, looking for solution. – Pablo – 2010-06-23T01:44:44.560

@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 – 2010-06-23T02:00:58.423

@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 – 2010-06-23T02:11:31.903

@Michael: It's really a mystery. I had to reformat my hard disk, and re-install Mac OS X 10.6 right the other day. In these day, I didn't change any settings specific for how the private keys are exported (if they even exist); I would then expect that the behavior I notice on my Mac should be the same you notice on yours. – kiamlaluno – 2010-06-23T15:17:51.303

@kiamlaluno: Anyway, thanks, I'll accept your answer since you are the only one who tried to help me. – Pablo – 2010-06-23T23:08:35.400

@Michael: I would have preferred to resolve the problem. I had a problem with Automator that was not removing the actions I deleted, and I had to reinstall Mac OS; I understand what it means to find a problem others are not having. – kiamlaluno – 2010-06-24T11:25:06.960

Yea, finally I found and fixed the issue. For some reason Keychain app version on that particular machine was lower than on the other. What I have done is extracted Keychain app from cumulative update, reinstalled and it worked like charm. – Pablo – 2010-08-30T02:09:08.460

@Michael: I am glad you found the problem, and resolved it. – kiamlaluno – 2010-08-31T02:51:01.060

8

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.

commonpike

Posted 2010-06-22T13:13:37.423

Reputation: 293

1I 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 – 2018-03-07T11:00:44.130

1

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.

Solution:

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.

Wes Adams

Posted 2010-06-22T13:13:37.423

Reputation: 11

If that works, you could also start the keychain access application using sudo from the command line. but it didnt help for me. – commonpike – 2014-10-21T16:37:51.703

0

Whenever keychain is doing some problem, just click the lock to 'lock the login keychain', and afterward, click it again to unlock. Keychain will ask for the system password and then everything is working as normal.

The main issue is probably entering a wrong password once which freaks Keychain out.

Amit Bluman

Posted 2010-06-22T13:13:37.423

Reputation: 1