Tomcat-42 / simple-password-manager

Simple gnupg based password manager written in c.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-password-manager

This is a simple (as the name suggests) and secure password manager written in c that store data in a single JSON file encrypted/decrypted by gnupg.

Installation

If you don't have gnupg installed, install it:

# On arch based distros:
pacman -S gnupg
# On debian based distros:
apt install gnupg

OBS: gnupg must be in $PATH as gpg;

And if you don't have a keypair, generate one:

gpg --full-gen-key

To view keys fingerprint:

gpg --list-keys <YOUR NAME OR EMAIL>

Next, edit src/config.h's PASSWORD_FILE and GPG_RECIPIENT macros to specify, respectively, the absolute file path where passwords will be stored and the 40 digit hexadecimal fingerprint of your public key.

Finally, compile and install:

make && sudo make install

OBS: make install will copy spm and spm-dmenu to /usr/bin by default, if you want to change installation target edit config.mk (or just make and do whatever you want with spm and spm-dmenu).

Usage

Each entry have 4 fields: name, login, password and other, in which only name and login are mandatory.

Add a entry:

spm -a|--add name login [password] [other]

Show a entry by name:

spm -s|--show name

Delete a entry by name:

spm -d|--delete name

List all entries:

spm -l|--list

Help:

spm -h|--help

spm-dmenu

spm-dmenu is a wrapper script for spm that uses dmenu for navigation and xsel for copyind data to clipboard.

Install dmenu and xsel:

# On arch based distros:
pacman -S xsel dmenu
# On debian based distros:
apt install xsel dmenu

Run the script(or configure a key binding):

./spm-dmenu

About

Simple gnupg based password manager written in c.

License:MIT License


Languages

Language:C 92.6%Language:Shell 6.6%Language:Makefile 0.8%