3demax / pass-import

A pass extension for importing data from most of the existing password manager.

Home Page:https://www.passwordstore.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pass import

Build Status Code Coverage Code Quality Last Release

A pass extension for importing data from most of the existing password manager.

Description

pass import is a password store extension allowing you to import your password database to a password store repository conveniently. It natively supports import from 23 different password managers. More manager support can easily be added.

Passwords are imported into the existing default password store, therefore the password store must have been initialised before with pass init.

By default, pass imports entries at the root of the password store and only keeps the main data (password, login, email, URL, group). This behaviour can be changed using the provided options.

Pass import handles duplicates and is compatible with browserpass.

The following password managers are supported:

Password Manager How to export Data Command line
1password See this guide pass import 1password file.csv
1password4 File > Export: CSV pass import 1password4 file.csv
1password4pif File > Export: 1PIF pass import 1password4pif file.1pif
bitwarden Tools: Export pass import bitwarden file.csv
chrome See this guide pass import chrome file.csv
chromesqlite See this guide pass import chrome file.csv
enpass File > Export > As CSV pass import enpass file.csv
dashlane File > Export > Unsecured Archive in CSV pass import dashlane file.csv
fpm File > Export Passwords: Plain XML pass import fpm file.xml
gorilla File > Export: Yes: CSV Files pass import gorilla file.csv
kedpm File > Export Passwords: Plain XML pass import kedpm file.xml
keepass File > Export > Keepass2 (XML) pass import keepass file.xml
keepass2csv File > Export > Keepass (CSV) pass import keepasscsv file.csv
keepassx File > Export to > Keepass XML File pass import keepassx file.xml
keepassx2 Database > Export to CSV File pass import keepassx2 file.csv
keepassxc Database > Export to CSV File pass import keepassxc file.csv
lastpass More Options > Advanced > Export pass import lastpass file.csv
networkmanager Also support specific networkmanager dir and ini file pass import networkmanager
password-exporter Add-ons Prefs: Export Passwords: CSV pass import passwordexporter file.csv
pwsafe File > Export To > XML Format pass import pwsafe file.xml
revelation File > Export: XML pass import revelation file.xml
roboform Roboform > Options > Data & Sync > Export To: CSV file pass import roboform file.csv
upm Database > Export pass import upm file.csv

Usage

usage: pass import [-h] [-V] [[-p PATH] [-c] [-e] [-f] | -l] [manager] [file]

  Import data from most of the password manager. Passwords
  are imported in the existing default password store, therefore
  the password store must have been initialised before with 'pass init'

positional arguments:
  manager               Can be: 1password, 1password4, 1password4pif,
                        bitwarden, chrome, chromesqlite, dashlane, enpass,
                        fpm, gorilla, kedpm, keepass, keepasscsv, keepassx,
                        keepassx2, keepassxc, lastpass, networkmanager,
                        passwordexporter, pwsafe, revelation, roboform.
  file                  File is the path to the file that contains the data to
                        import, if empty read the data from stdin.

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  Import the passwords to a specific subfolder.
  -c, --clean           Clean data before import.
  -e, --extra           Also import all the extra data present.
  -l, --list            List the supported password managers.
  -f, --force           Overwrite existing path.
  -q, --quiet           Be quiet.
  -v, --verbose         Be verbose.
  -V, --version         Show the program version and exit.

More information may be found in the pass-import(1) man page.

See man pass-import for more information.

Examples

Import password from KeePass

pass import keepass keepass.xml
(*) Importing passwords from keepass
 .  File: keepass.xml
 .  Number of password imported: 6
 .  Passwords imported:
       Social/mastodon.social
       Social/twitter.com
       Social/news.ycombinator.com
       Servers/ovh.com
       Servers/ovh.com0
       Bank/aib

Import password to a different password store

export PASSWORD_STORE_DIR="~/.mypassword-store"
pass init <gpg-id>
pass import keepass keepass.xml

Import password to a subfolder

pass import keepass keepass.xml -p Import/
(*) Importing passwords from keepass
 .  File: db/keepass.xml
 .  Root path: Import
 .  Number of password imported: 6
 .  Passwords imported:
      Import/Social/mastodon.social
      Import/Social/twitter.com
      Import/Social/news.ycombinator.com
      Import/Servers/ovh.com
      Import/Servers/ovh.com0
      Import/Bank/aib

Security consideration

Passwords should not be written in plain text form on the drive. Therefore when possible you should pipe your passwords to pass import:

my_password_manager_export_cmd | pass import keepass

Otherwise, if your password manager lacks this command line option, you should take care of securely removing the plain text password database:

pass import lastpass data.csv
shred -u data.csv

You might also want to update the passwords imported using pass-update.

Installation

Requirements

  • pass 1.7.0 or greater.
  • python3 (python 3.4, 3.5, 3.6 and 3.7 are supported)
  • python-defusedxml
    • Debian/Ubuntu: sudo apt-get install python3-defusedxml
    • OSX: pip3 install defusedxml

ArchLinux

pass-import is available in the Arch User Repository.

yay -S pass-import  # or your preferred AUR install method

Gentoo Linux

emerge app-admin/pass-import

NixOS

nix-env -iA nixos.passExtensions.pass-import

From git

git clone https://github.com/roddhjav/pass-import/
cd pass-import
sudo make install  # For OSX: make install PREFIX=/usr/local

Stable version

wget https://github.com/roddhjav/pass-import/releases/download/v2.3/pass-import-2.3.tar.gz
tar xzf pass-import-2.3.tar.gz
cd pass-import-2.3
sudo make install  # For OSX: make install PREFIX=/usr/local

Releases and commits are signed using 06A26D531D56C42D66805049C5469996F0DF68EC. You should check the key's fingerprint and verify the signature:

wget https://github.com/roddhjav/pass-import/releases/download/v2.3/pass-import-2.3.tar.gz.asc
gpg --recv-keys 06A26D531D56C42D66805049C5469996F0DF68EC
gpg --verify pass-import-2.3.tar.gz.asc

Contribution

Feedback, contributors, pull requests are all very welcome. Please read the CONTRIBUTING.md file for more details on the contribution process.

License

Copyright (C) 2017  Alexandre PUJOL

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

A pass extension for importing data from most of the existing password manager.

https://www.passwordstore.org/

License:GNU General Public License v3.0


Languages

Language:Python 55.3%Language:Shell 32.0%Language:Roff 9.2%Language:Makefile 3.5%