There are many different versions of KeePass. There’s KeePassX, the original, and KeyPass2. In this tutorial, we’ll be focusing on how to install KeePass 2 on your Linux operating system.
sudo apt install libmono-system-xml-linq4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-runtime-serialization4.0-cil mono-mcs mono-complete keepass2
sudo apt-get install libmono-system-xml-linq4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-runtime-serialization4.0-cil mono-mcs mono-complete keepass2
sudo pacman -S keepass
sudo dnf install keepass
sudo zypper install keepass
KeePass 2 is pretty popular, due to it’s plugin support and the vast amount of mobile apps and browser extensions that work with it. As a result, users on pretty much any Linux distribution can get a copy of it installed. To get it working on your system, open your package manager (or software store), search for KeePass2, and install it.
To make a KeePass2 password database, you’ll need to import passwords. For a large amount of Linux users, this means exporting the passwords saved directly inside Google Chrome/Chromium or Firefox. In this section of the tutorial, we’ll show you how to export the passwords saved inside of your browser, and save them to a file for importing into a new KeePass2 database.
Google Chrome has a pretty decent password management feature. Passwords are to passwords.google.com, and all of your private data is in the hands of Google. This works for most people, but if you’re looking to get away from Google, and move on to KeePass2, here’s where to start.
First, go to the address bar and enter: chrome://flags/
This opens up the experimental browser flags page. From here, you’ll need to look for the password Import/Export feature. Scroll through the long list. Alternatively, press Ctrl + F and type “Password import and export“.
Click the enable button to turn the Import/Export feature in the browser on.
Next, find “Enable Material Design settings” and set it to “disabled”.
After turning the feature off, Chrome will prompt you to re-launch the browser. Click the re-launch button.
When the browser re-opens, open settings and type chrome://settings/passwords?search=passwords in the address bar. Click the export button and save the passwords database as a CSV file on your Linux PC.
Unlike Chrome, Firefox doesn’t have any ability — at least natively — to export passwords. To accomplish this task, you’ll first need to install an addon. Once installed, go to the Firefox addons area, find “Password Exporter” and click the preference button.
This brings up the Password Exporter main window. From here, it’s possible to export all of your passwords. Click “Export Passwords”. This grabs all saved passwords and puts them in an XML file.
Note: do you save all of your password data inside of LastPass? Follow the LastPass official instructions to export your passwords.
Before importing passwords, you’ll need to make a new KeePass database. Press Ctrl + N to create (and save) a new database.
After making a new database, you’ll need to set up a master password. Go to this website and generate a secure password. Then, take the password and enter it into the master password window.
After entering a secure master password, check the box next to “Key file”, and then click the create button to make a new key file. This is important, as it adds a bit of extra security. When both the key and master are set up, press the OK button to get started.
Import your password database by clicking File > Import.
To import the Chrome password database, click on “generic CSV” database.
To import the Firefox Password Exporter database, click on Password Exporter XML.
If you have multiple computers, the best way to sync the password database is to install Dropbox. Place the password database and key inside your Dropbox folder and point KeePass to it. This way, each and every change made to the password database (adding and removing new passwords, etc) will instantly sync across computers. This effectively makes your local password database “cloud-based”. If you’re not comfortable with Dropbox, consider something like NextCloud.
Using KeePass In Browsers
The KeePass setup works fine on its own, but if you want to tightly integrate your local database with your browser, here’s how to do it. First, enter the KeePass directory:
Note: Ubuntu and etc use the first one, and Arch Linux users use the second one. Try both locations to be safe.
Inside the KeePass2 location, make a plugins folder, and download the HTTP plugin.
sudo mkdir Plugins sudo wget https://passifox.appspot.com/KeePassHttp.plgx
Then, change the permissions of the plugin so that the program can correctly access it.
sudo chmod 644 KeePassHttp.plgx
From here, install a browser extension. There are many different ones for Chrome and Firefox too. That being said, the most effortless one out there is probably KeePassHelper. It makes entering passwords an effortless process.
Get KeePassHelper for Firefox or Chrome/Chromium. When the add-on installs, it’ll detect the unlocked password database and automatically fill out login info for you!
With password managers it becomes much easier to keep track of complicated passwords. That said, most modern password managers shouldn’t be trusted. The reason? You should never trust anyone with your passwords but yourself. With KeyPass, everything is secure, and only you can unlock it. Sure, other companies might claim that they don’t look at your passwords, or sell your usage data, but we’ll never know the truth. That’s why it is probably best to roll your own solution!