How can I import Firefox and Safari saved passwords to 1Password 6 for Mac?

Options
marty_b
marty_b
Community Member

I'm surprised to find that there isn't a quick import button for this. Is there an easy way to do this? It will take forever to manually move over all my accounts.

Thanks.


1Password Version: 6
Extension Version: Not Provided
OS Version: OSX 10.11.5
Sync Type: iCloud

Comments

  • rjh
    rjh
    Community Member
    Options

    Hello @marty_b
    Sorry that you're having issues with importing login data from Safari and Firefox.
    The problem isn't that 1Password can't import them, but rather that neither Safari nor Firefox can export them. Your passwords are saved securely in your Keychain app.
    It is possible to export them from Keychain, but it's not a simple process.
    You can find out how to export your keychain data to a CSV-file here.

    Maybe, though, the AgileBits staff have a simpler solution?
    Cheers,
    Rob

  • marty_b
    marty_b
    Community Member
    Options

    Hi Rob, thanks for the idea. I will try.

  • tullyhansen
    tullyhansen
    Community Member
    Options

    Further to Rob's suggestion, on the Firefox side there's a third-party add-on (aptly named Password Exporter) that will export your Firefox saved passwords to a .csv file that can (with some editing) be imported into 1Password. I can't speak to the security of the add-on (third party software and passwords is always a risk, so I'd advise doing your due diligence!), but it works for me exporting a few test credentials out of Firefox 47 under OS X 10.11.

  • marty_b
    marty_b
    Community Member
    Options

    I am a bit confused as to how to use the two scripts given?

    set the logFile to ((path to desktop) as string) & "Passwords"
    set keychainPath to "/Users/Dad/Desktop/dad.keychain"

    -- write_to_file taken from http://www.macosxautomation.com/applescript/sbrt/sbrt-09.html
    on write_to_file(this_data, target_file, append_data)
    try
    set the target_file to the target_file as string
    set the open_target_file to open for access file target_file with write permission
    if append_data is false then set eof of the open_target_file to 0
    write this_data to the open_target_file starting at eof
    close access the open_target_file
    return true
    on error
    try
    close access file target_file
    end try
    return false
    end try
    end write_to_file

    tell application "Usable Keychain Scripting"
    set keychainItems to get every keychain item of keychain keychainPath
    repeat with keychainItem in keychainItems
    set aServer to server in keychainItem
    set anAccount to account in keychainItem
    set aPassword to password in keychainItem

        set csvEntry to aServer & "," & anAccount & "," & aPassword & "
    

    "

        my write_to_file(csvEntry, logFile, true)
    end repeat
    

    end tell

    and

    Am I supposed to put them all in one file, or just run them one after another?

    Thanks.

  • marty_b
    marty_b
    Community Member
    Options

    I tried running just the first script but I get this:

    keychain.sh: line 1: syntax error near unexpected token (' keychain.sh: line 1:set the logFile to ((path to desktop) as string) & "Passwords"'

    I am wondering though why is this such a problem? If a third party program like Firefox can create, write and read keychain entries, why can't a third party app like 1Password also read them? This is almost a deal breaker if you have tons of saved passwords, it could be hours of work to deal with it. Why isn't there a good solution?

  • rjh
    rjh
    Community Member
    Options

    Hi again @marty_b
    I did some more research and found this thread.
    With a link to MrC's 1Password converter scripts.
    Perhaps they are more up-to-date and will work better. MrC is known as the 1Password scripting expert here …
    Have fun,
    Rob

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @marty_b ,

    I also replied to your post in the converter thread. Ill help you get your data converted in the morning. It is really late here in California. Both Firefix and Safari data can be exported, converted and imported.

  • marty_b
    marty_b
    Community Member
    Options

    Thanks.

  • Pilar
    Pilar
    1Password Alumni
    Options

    Hi @marty_b,

    It looks like MrC has you covered! I hope everything goes well for you when you import your data into 1Password. If you need help with anything else, we're always here to help! :chuffed:

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hello again @marty_b,

    Your Firefox and Safari passwords are in two different locations, so there are two parts to your task.

    In this thread, I've given the procedure for getting your Firefox passwords into 1Password.

    Safari Passwords are stored in the OS X Keychain. The keychain converter of the converter suite will help you get your Safari (and other OS X) passwords into `1Password. Use the 1.09 version in Testing Bits mentioned in the first post of the thread, and follow the process mentioned in the README.pdf file, esp. the specific Keychain export instructions. Once exported, it should be as simple as opening your export file with the AppleScript Conversion Helper and following the steps.

    I'm happy to help if you need more guidance.

This discussion has been closed.