Skip to content
comotion edited this page Sep 15, 2010 · 17 revisions

CPM

CPM is the Console Password Management tool, which allows you to securely store passwords and other key=value pairs in an encrypted XML tree. A single CPM database can be securely used by several people at the same time, see multiuser CPM. CPM passwords can be revision controlled, see revision control.

CPM is adopted here since I've fixed some minor issues of bit rot.

Install from package

Ubuntu 10.04 LTS 64bit users: install the _debian_ package cpm_0.25~beta-2debian3_amd64.deb See the downloads section for Debian packages at http://github.com/comotion/cpm/downloads

To install, download the package and run

dpkg -i cpm_0.25~beta-2debian3_amd64.deb

Quick Start

You need: a GPG key and 3 minutes of your time. Create the password database (only once):

me@mine:~$ create-cpmdb

Use your GPG key to encrypt the database. This puts a .cpmdb file in your home folder.

Run CPM and add your passwords! Exit by hitting ESC to save the keys.

me@mine:~$ cpm

and you have a working CPM install

For a good read on CPM go to http://kacper.blog.linpro.no/archives/135

If you're sharing your CPM database with others, see revision control.

Doing it by hand

You can do everything the hard way... but most people prefer the "Quick Start" routines outlined above. If you still insist, below is a step-by-step guide to doing most everything manually.

Build dependencies

CPM needs cdk, cracklib, dotconf, gpgme, ncurses, gettext and zlib to build.

apt-get install libcdk5 libcdk5-dev \
  cracklib-runtime cracklib2 cracklib2-dev \
  libdotconf1.0 libdotconf-dev \
  libgpgme11 libgpgme11-dev \
  libncurses5 libncurses5-dev \
  zlib1g zlib1g-dev gettext

Building

::
./configure --with-crack-dict=/var/cache/cracklib/cracklib_dict make

Installation

::
make install

CPM must be SUID root to aquire the necessary locks to safely store your passwords. Set up the right bits:

chown root:root /usr/local/bin/cpm
chmod +s /usr/local/bincpm

Running

Set up your password db if you don't have one already:

cp conf/cpmrc-default ~/.cpmrc
cd share/cpm
./import.sh general passwordsafe/example.txt
cp -i cpm_convert.db ~/.cpmdb
::
./cpm

And you are ready to go! RPMS package contributions are gratiously accepted!

Clone this wiki locally