This program is a ncurses based console tool to manage passwords and store them public key encrypted in a file - even for more than one person. The encryption is handled via GnuPG so the programs data can be accessed via gpg as well, in case you want to have a look inside. The data is stored as as zlib compressed XML so it's even possible to reuse the data for some other purpose.
The software uses CDK (ncurses) to handle the user interface, libxml2 to store the information, the zlib library to compress the data and the library GpgMe to encrypt and decrypt the data securely.
The next release 0.25beta will work with the latest CDK5 version 20090215 and I will publish it as soon as this CDK release makes it into the distributions.
Moreover I am currently looking for a volunteer for Debian and/or Ubuntu package maintenance. I am not familiar with packaging for the official distributions but would like to see cpm into these distributions as well.
A mailinglist is available at SourceForge and you can subscribe here.
Screenshots of cpm in action are here.
The features of CPM are listed below. A detailed description of the features is available here.
This is my current todo list for this project:
The package is also available as a Debian package. The package is available at http://debian.harry-b.de/unstable/.
To add this package to your APT-repository, just add the line
deb http://debian.harry-b.de/ unstable/
or
deb http://debian.harry-b.de/ sarge/
to your sources list in /etc/apt/sources.list.
To get the the Debian package's signature validated with SecureApt, please download my public key and save it into a file e.g. named cpm-key.txt and then, as user root the following command:
$ apt-key add cpm-key.txt
After you have issued this command, the public key is added to the apt-get keyring and when you now run apt-get, the package's signature gets validated to make sure you got the original, unmodified package.
For Gentoo Linux a ebuild file is available here.
First add PORTDIR_OVERLAY=/usr/local/portage to /etc/make.conf.
To use this, you have to perform the following steps:
$ mkdir -p /usr/local/portage/app-admin/cpm $ cp cpm-0.8_beta.ebuild /usr/local/portage/app-admin/cpm $ ebuild /usr/local/portage/app-admin/cpm/cpm-0.8_beta.ebuild digest $ emerge /usr/local/portage/app-admin/cpm/cpm-0.8_beta.ebuild
where you have to replace the version number with the current version.
The ebuild file was created by Marc Jauvin. Thanks alot for the support!
The key used for the signature is
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.1 (GNU/Linux) mQGiBEKtgVQRBACnQkjlPR7qmpnhmtpVnxH2L7vaa5ZWUbk7JFIU053j3oXyiJdG KkyQ21DcK2w3YzB/960ONN+nPvGJOc57U0cuT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+q7Bk0wqea1co+Tc3nFwXXAtVVUcqDozHcIxZm1T3nd83lrP7qsns c2DqcwADBQf/Zp4oZ//y+zfRGdmZ4YQJAWbpFYXHLIO5tZ0kSrZe36rkveP4VLJ9 pxZbl4XH4YXsHHPgbnkuCClakHPCJKSck07EkMNDUmYwXdLV0r+mdFVPRGKXFTG7 ZxDtm7EBMCCxx5J9lVvvwMaQq2pJoHasNFPm+CyOugvfeZn81DDBAHo2mIBR5BWB 9VcWxLY93jmBR8mc7Cg7TeLO9TKam+5xLVZxFHs+V0z1lugQ2pMTfH/wzgwgF5qW smD8vdt4uEVCEWE5uIKSUIecPh4hC1GQUXzLfpAbVzmVFGE6UekO8m+ZwS4Rnd6t ko9Sb6l69VJiISKa+UyvePITwlqNSHVN+ohJBBgRAgAJBQJCrYFqAhsMAAoJEF9/ lP5Rz3V7JwQAoIRHaS4A4AZUGzy0R1xdNjxLuvSJAKCz7yaaYl2GCzmyQCiiv0rY Qd7EfQ== =v4bV -----END PGP PUBLIC KEY BLOCK-----
and can be downloaded as well.
There are packages available for Fedora and Red Hat Enterprise Linux 5 and compatible. Details can be found here. Thanks to Marek Mahut for the packaging.
CPM has been tested on the following platforms:
If you encounter memory problems, e.g. on Gentoo Linux, please read the section Memory issues in the security section of this document.
In case you use CPM on another platform it would be nice if you could send me a short email reporting success (or failure which I will try to fix as soon as possible).
To install this program, the following libraries are required:
On Ubuntu systems, the package names are:
Installation should be quite simple if all requirements are met:
-DTEST_OPTION)
In case the constant CRACKLIB_DICTPATH is not defined in your crack.h file, you might have to tell configure where the dictionary files of libcrack are. This can be done by passing e.g. –with-crack-dict=/var/cache/cracklib/cracklib_dict to configure. Please note, that the file extension must not be specified.
If you don't have cracklib installed, you can turn off it's use by passing –without-crack-lib to the configure command.
To handle memory problems, the option –without-memlock might help you. Please read the section about Memory Issues in the security section very carefully.
A detailed GPG setup procedure for GPG rookies is here.
For debugging, testing and configuration these labels can be defined:
The program tries to find it's configuration file at the following locations in the given order:
${HOME}/.cpmrc/etc/cpm/cpmrc/etc/cpmrcAs soon as one of these files is found, it's used and the others (in case they exist) are ignored. You can find a default configuration in the file cpmrc-default.
The binary should be suid root (mode 4755) to enable memory locking and protection from ptrace attacks.
The applications runs a check on each startup on the following things:
If one of these tests fail, a warning is displayed and a key must be pressed to continue or abort the application. The current security level can be displayed using the '–security' commandline argument.
On some systems, the locked memory for an application is limited. This is the case e.g. on Gentoo and SuSE systems.
In this case the limit is set to something like 32k which you can see using the command ulimit -l. The interesting part of it's output is the line max locked memory - it should be at least 5120k.
I have no idea why this limit is used at all (except for some special purpose machines) and especially at this low limit. If anyone has an idea why it is used and set to such a small value please send me an email.
cpm locks it's memory because it is the only way to prevent the memory from being swapped to disk, in case the operating system decides that it needs memory.
If you want to disable memory locking (and take the risk that your passwords land in clear text on your harddisk) you can use the option –without-memlock to the configure command.
!!! WARNING !!! It is NOT recommended to use this option - it opens a well known security leak!!! !!! WARNING !!!
Unfortunately it is not possible to predict the exact amount of memory which is necessary to run cpm. It depends on the size of the XML structure and many other things which are not known at program startup.
Hence, the default security procedure checks for at least 5120k of memory to lock. If you expect to handle alot of data with cpm, you can set this limit somewhat higher by using the –with-memlock option which specifies the amount of memory in kByte.
Many thanks go to Daniel Schröder mail@dschroeder.info and Holger Dinkel holger.dinkel@med.uni-erlangen.de for helping me to track this problem down and the explanation how to get around it.
To test if cpm fails because of the ulimit problem, run this procedure:
$ su - Password: $ ulimit -l 5120 $ su - your_user $ cpm -s
After these steps, the program should run correctly without any memory hassles.
In case you are running a Debian like system, you might want to change the file /etc/security/limits.conf.
Add the following entry into that file (as root) to set a proper limit for a specific user:
my_user - memlock 6144
where my_user is the username you want to use CPM with.
To get a detailed help during runtime, press <CTRL><H>.
Right now there are three interfaces available for importing data. All these are handled by the import.sh script which can be found in /usr/share/cpm. The basic procedure always converts the 'foreign' format to cpm's own CSV format and then this data gets imported.
The general interface imports a properly formatted CSV file.
The passwordsafe interface can read CSV export files from Password Safe (by Bruce Schneier)
The PMS interface can read CSV files created by pms_export
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="0.2alpha">
<template>
<title level="1">host</title>
<title level="2">service</title>
<title level="3">user</title>
<title level="4">password</title>
</template>
<editor>
<user uid="1">unknown</user>
<user uid="2">Harry Brueckner</user>
</editor>
<node label="label 1" >
<node label="label 1.1" />
<comment>here goes the comment</comment>
<node label="label 1.2" />
<node label="label 1.3" />
</node>
<node label="label 2" >
<node label="label 2.1" />
<node label="label 2.2" />
<comment>here goes anothe comment</comment>
<node label="label 2.3" />
</node>
</root>
Here are some backlinks to my project in alphabetical order: