Using Keepass with Chrome and Firefox

Using Keepass with Chrome and Firefox

Keepass, an open source software, is arguably one of the best password management tools available. My personal favorite is Lastpass for the sheer number of available features, and because of close integration with Chrome. Keepass however seems to have a few issues with Chrome, though Firefox integration with the Keefox extension is perfect.

This article explains how to install Keepass on Windows and Linux, and has been tested to work with Keepass 2.22, and Windows 8 64 bit, Ubuntu 12.10 and Debian Squeeze.

To use Keypass with your browsers:

How to install and use Keepass on Windows 7 and 8

The following article applies to Windows 7/8. For Linux info, skip to the end.

How to install and use Keepass on Windows 7 and 8 on Firefox:

Install the latest Keepass installer

Install Keefox extension

Run Keepass, create a database, and add either a Master password or Master Password+Composite key (This is a composite key. Both Key and password will be required), or just a Key.

Import your prior passwords (If using Lastpass, export from Lastpass to a .csv file, and then import the .csv file into Keepass, using the  Keepass menu>Import>Generic csv importer.

Save the key database (Only on saving does your master password and key file get updated into the database).

Now, on running Firefox, Keepass and Keefox will connect.

How to install and use Keepass on Windows 7 and 8 on Chrome/Chromium:

Install the latest Keepass installer

Install Chromipass extension from the Chrome web store.

Download KeePassHttp.plgx from the Github repo here. (If you omit this step, you will get a “KeePassHttp: Error: NETWORK_ERR: XMLHttpRequest Exception 101″ error.

Copy the downloaded file to C:\Program Files (x86)\KeePass Password Safe 2\plugins (for 64 bit Win7/8). You can use the environment variable:

%PROGRAMFILES(X86)%\KeePass Password Safe 2
MWSnap004 2013-04-14, 10_19_41

The easiest way to get the correct location is probably to choose Keefox options from Firefox, and look at the Keepass Tab.

Now visit any site with a username/password field, Click on the small Chromipass icon and follow the prompts to Connect Chromipass and Keypass.

Run Keepass, create a database, and add either a Master password or Master Password+Composite key (This is a composite key. Both Key and password will be required), or just a Key.

Import your prior passwords (If using Lastpass, export from Lastpass to a .csv file, and then import the .csv file into Keepass, using the  Keepass menu>Import>Generic csv importer.

Save the key database (Only on saving does your master password and key file get updated into the database).

Common errors and their solutions:

Error #1: Unable to start HttpListener: System.Net.HttpListenerException (0×80004005): Failed to listen on Prefix ‘http://localhost:19455/’ because it conflicts with an existing registation on the machine.

The error is due to two copies of the file KeePassHttp.plgx. In my case, I had one at C:\Program Files (x86)\KeePass Password Safe 2\plugins, and another one at C:\Program Files (x86)\KeePass Password Safe 2. I deleted the latter, and the error disappeared.

Installing Keepass in Ubuntu 12.10:

Firefox

Install Keepass from the Ubuntu repo. Install latest Firefox from Mozilla. Now download and install the Keefox plugin for Firefox. Manually copy the .pglx file from the Firefox profile folder to /usr/lib/keepass2 (as suggested by the extension). Open up Keepass2 and then Firefox. Opening the database links them up.

sudo add-apt-repository ppa:jtaylor/keepass
sudo apt-get install mono-complete
sudo apt-get install keepass2
sudo cp $HOME/.mozilla/firefox/*default/extensions/keefox@chris.tomlinson/deps/KeePassRPC.plgx /usr/lib/keepass2/

Note: You need to use the correct path as applicable to your PC.

Chrome

Association of Chrome with Chromipass and Keepass2 is buggy. It works on some sites but not on others. The author himself states that he was unable to associate these properly with the .pglx extension. The steps are the same. Get the specific files from Github, copy them to /usr/lib, install Keepass2 from the repo, and Chromipass from Chrome web store.

Note that the folder /usr/lib should contain the following files:

$l /usr/lib/keepass2/
total 2.4M
-rw-r--r-- 1 root root  252 Sep 28  2007 KeePass.config.xml
-rwxr-xr-x 1 root root 1.8M Sep 23 05:43 KeePass.exe
-rw-r--r-- 1 root root  535 May  1  2012 KeePass.exe.config
-rw-r--r-- 1 root root 180K Jan  7 09:53 KeePassHttp.plgx
-rw-r--r-- 1 root root 370K Jan  7 09:59 KeePassRPC.plgx

 

Once you’ve done this, reloading the browser asks for association.

Note that autofilling does not usually work in Chrome on Linux with Keepass2 and Chromipass. You can check if right clicking works.

Selection_001


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Comments

  1. Hi there, I am a bit of a noob. Sorry about that ;-)
    sudo cp /home/droidzone/.mozilla/firefox/9e5gvsa1.default/extensions/keefox@chris.tomlinson/deps/KeePassRPC.plgx /usr/lib/keepass2/

    I got this message: file or dir is not excisting

    Do I create this manualy?

     

     

    • droidzone says:

      See which of the directories does not exist.

      Of course in place of:
      /home/droidzone/.mozilla/firefox/9e5gvsa1.default/extensions/keefox@chris.tomlinson/deps/KeePassRPC.plgx

      You need to replace by your correct path.
      Check:

      Try:
      sudo cp $HOME/.mozilla/firefox/*default/extensions/keefox@chris.tomlinson/deps/KeePassRPC.plgx /usr/lib/keepass2/

  2. Already solved. Thank you very much :-)