How do I import from Enpass or 1PIF on Linux?

The password manager I used to use recently updated to a new version, which has rendered it unuseable for me (not a figure of speech), so I figured I'd give 1Password a try. So I installed 1Password X on Chrome under Ubuntu 18.04.1. The first thing I need to do, of course, is import my passwords from Enpass.

1Password's importer doesn't support this directly, and Enpass doesn't export to CSV. So after quite a bit of searching, downloading @MrC's converter (also not available for Linux, but I suppose it's Perl so let's try it), installing Perl and associated modules, configuring CPAN, installing more Perl modules, reading the docs, and so on, I manage to convert an Enpass JSON export to a 1pif file with:

perl convert.pl -v enpass ~/Desktop/enpass_export.json

Okay great! Now I have a 1PIF file. Let's go to the "Import" screen oh no:

If you already have data saved in a 1Password vault elsewhere, you can transfer it into this account using one of our native apps.

Well, there's no native app for Linux. So I read the docs for the command line client, op, but there's no mention of import functionality.

Reading @MrC's MCR documentation more closely shows that it has a 1Password converter, intended for exporting a 1pif file to eg. CSV. It says I need to do this with the --format option:

The output formatting is controlled by the formatter specified using the --format option. Provide a formatter name (the name of a file in the Formatters folder, without the file suffix). Example: --format html_expanded.

So maybe if I convert the Enpass JSON to a 1Password 1PIF and then that to a generic CSV, that will work? I try it with:

perl convert.pl --format csv -v onepif ~/Desktop/1P_import.1pif 
The file '--format' does not exist.

Hmm.

perl convert.pl -v onepif ~/Desktop/1P_import.1pif --format csv
Use of uninitialized value $n in concatenation (.) or string at
    /home/redacted.org/username/Downloads/mrc-converter-suite-2019-03-10-1118/mrc-converter-suite/./Utils/Utils.pm line 58 (#1)
    (W uninitialized) An undefined value was used as if it were already
    defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.

    To help you figure out what was undefined, perl will try to tell you
    the name of the variable (if any) that was undefined.  In some cases
    it cannot do this, so it also tells you what operation you used the
    undefined value in.  Note, however, that perl optimizes your program
    and the operation displayed in the warning may not necessarily appear
    literally in your program.  For example, "that $foo" is usually
    optimized into "that " . $foo, and the warning will refer to the
    concatenation (.) operator, even though there is no . in
    your program.

Use of uninitialized value $_[1] in numeric eq (==) at
    /home/redacted.org/username/Downloads/mrc-converter-suite-2019-03-10-1118/mrc-converter-suite/./Utils/Utils.pm line 42 (#1)
Imported  items
Exported 0 total items

Hmmmmmm.

So, at this point I'm stuck. 1Password comes highly recommended from a number of sources, so I'm eager to give it a try, and I am always reassured by a company that charges an ongoing fee because it gives me a some degree of confidence that the servers will stay on. But this has not been a smooth experience so far.

Am I approaching this wrong? Is there a better way to get data out of Enpass and into 1Password (that isn't "open literally every website in Enpass and let 1Password capture it?" ... although admittedly it might have been faster than what I've tried so far)? @MrC, are you still maintaining the converter, and is there somewhere I should be filing bug reports for it? Or, since 1Password are recommending this tool, are they supporting it instead? You can assume that I don't have access to a Windows or OS X machine; I would have just switched to that if it were an option. Does that mean 1Password is just the wrong tool for me, and I should move on and try another password manager with a dedicated Linux app?

Any advice would be appreciated.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Ubuntu 18.04.1
Sync Type: Not Provided

Comments

  • MrCMrC Community Moderator
    edited March 15

    @detly ,

    First, yes I still do maintain the converters, and have been doing so for over 4 years. In fact, I just created a new on Saturday.

    The converter suite was designed for converting to 1PIF, for importing from a desktop 1Password app (macOS, Windows). But the converter runs on Linux too, and I've done a few conversions there. There are so many distributions, that I don't bother to creating documentation for running the converter there. And with no desktop 1Password there, your situation is rare.

    The op CLI isn't meant for importing via 1PIF. As soon as op is ready to support importing with as much fidelity as 1PIF, I'll support direct import via op for those who want to use this. I've asked for this.

    The onepif converter in the converter suite was designed for converting to a format for printing (via HTML) and for simple CSV conversion (a format-er could do about just about anything). Convert from Enpass > 1PIF > CSV would be somewhat loose, and was never designed to import back into 1Password. It was meant to be compact.

    Still, the basic idea is sound:

    $ perl convert.pl enpass -v _TestFiles/enpass/enpass6.json
    Imported 6 items (3 items expanded to 6 items)
    Exported 1 identity item
    Exported 1 socialsecurity item
    Exported 1 creditcard item
    Exported 1 software item
    Exported 5 login items
    Exported 9 total items
    You may now import the file /Users/MrC/Desktop/1P_import.1pif into 1Password
    
    $ perl convert.pl onepif --format csv -v ~/Desktop/1P_import.1pif
    Imported 9 items
    Exported 1 software item
    Exported 1 identity item
    Exported 1 socialsecurity item
    Exported 1 creditcard item
    Exported 5 login items
    Exported 9 total items
    Your output file is /Users/MrC/Desktop/1P_converted.csv
    

    But now you have to edit the CSV with a spreadsheet program, to create a CSV format suitable for 1Password to import. To facilitate this, construct individual CSV files / category by using --exptypes.

    $ perl convert.pl onepif --format csv -v --exptypes login ~/Desktop/1P_import.1pif
    Imported 9 items
    Exported 5 login items
    Exported 5 total items
    Your output file is /Users/MrC/Desktop/1P_converted.csv
    

    FYI: this:

    perl convert.pl --format csv -v onepif  ~/Desktop/1P_import.1pif 
    

    didn't work because you don't have the converter name earlier on the command line. The converter name onepif needs to come first, since it also provides the additional option --format (convert.pl knows nothing about this option).

    Let's see where this takes you....

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file