How to access an OS X keychain via Ubuntu

12,530

Solution 1

If you are not afraid of a small amount of scripting, there is a python wrapper for the security command with a short tutorial here. I have never had to do this before, so I can't speak to its efficacy.

Solution 2

I think you don't have a similar tool in Linux to do that.

From all the tools i have seen, they all require that you have Mac OS X to use them. For example, keychaindump requires securityd command.

So i guess the only option you have left is to borrow someone's mac.

Share:
12,530

Related videos on Youtube

adrianh
Author by

adrianh

Updated on September 18, 2022

Comments

  • adrianh
    adrianh over 1 year

    I need to access some of the content of an old OS X keychain.

    I know the password - this isn't about cracking ;-)

    What I don't have is a Mac. I do have the keychain files on a backup drive.

    Is there any way to get at the contents on an Ubuntu box? A port of the OS X /usr/bin/security somewhere for example?

    A definitive "no" would be as useful as a "yes".

    • thirtythreeforty
      thirtythreeforty over 11 years
      According to Wikipedia, the OS X keychain toolkit is open source. (I know it's for BSD, but...) You might be able to compile security yourself.
    • Jeff Burdges
      Jeff Burdges about 9 years
      Any idea where Mac OS X keeps the wifi asswords so we can read them with the answers?
  • astex
    astex over 11 years
    After following a few links, there's also this, which should provide a workable GUI.
  • adrianh
    adrianh over 11 years
    Unfortunately that doesn't help since it only gives access to the OS X keychain when running on OS X. It's just provides a python way of talking to /usr/bin/security. It doesn't help on other platforms.
  • astex
    astex over 11 years
    I don't think that's the case for the second solution mentioned in the comments. Sorry, I should have clarified.
  • thirtythreeforty
    thirtythreeforty over 11 years
    No, the keychain concept is to prevent people who don't know the password from accessing it. He's got the credentials, so it should be possible, with some work.
  • coteyr
    coteyr over 11 years
    He might have his password but I believe it's also encrypted with a OS X key.
  • adrianh
    adrianh over 11 years
    @coteyr - you're incorrect. Keychains can be copied between OS X machines - so they're not tied to any kind of machine specific key. Any kind of OS specific key would be trivially crackable since it would have to be public for decryption to actually happen.
  • adrianh
    adrianh over 11 years
    It does apply to that - source here bitbucket.org/kang/python-keyring-lib/src/… - OS X specific ;)
  • coteyr
    coteyr over 11 years
    Source Code May help you adrianh. Some Docs May be of use. but thats all I could find. I still know that I have a very hard time moving my keychain from one mac to another but that could be application specific. Sorry if the answer is wrong. (sorry for the double post was reading the code)
  • dwlz
    dwlz about 10 years
    The link you've referenced 404s.