2017-02-21 19:32:26 +00:00
|
|
|
# MPW: Manage your passwords!
|
2017-08-15 19:13:34 +00:00
|
|
|
[![Version](https://img.shields.io/badge/latest_version-4.2.2-green.svg)](https://github.com/nishiki/manage-password/releases)
|
2017-02-21 19:32:26 +00:00
|
|
|
[![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password)
|
2017-11-19 22:03:16 +00:00
|
|
|
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE)
|
2017-02-21 19:32:26 +00:00
|
|
|
|
|
|
|
mpw is a little software which stores your passwords in [GnuPG](http://www.gnupg.org/) encrypted files.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
2017-03-03 21:42:30 +00:00
|
|
|
* generate random password
|
2017-02-21 19:32:26 +00:00
|
|
|
* generate OTP code
|
|
|
|
* copy your login, password or otp in clipboard
|
2017-03-02 22:43:19 +00:00
|
|
|
* manage many wallets
|
|
|
|
* share a wallet with others GPG keys
|
2017-02-21 19:32:26 +00:00
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
On debian or ubuntu:
|
|
|
|
```
|
|
|
|
apt install ruby ruby-dev xclip
|
|
|
|
gem install mpw
|
|
|
|
```
|
|
|
|
|
2017-03-02 22:43:19 +00:00
|
|
|
## How to use
|
|
|
|
### First steps
|
2017-02-21 19:32:26 +00:00
|
|
|
|
2017-03-02 22:43:19 +00:00
|
|
|
Initialize your first wallet:
|
2017-02-21 19:32:26 +00:00
|
|
|
```
|
|
|
|
mpw config --init user@host.com
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Add your first item:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw add --host assurance.com --port 443 --user user_2132 --protocol https --random
|
|
|
|
mpw add --host fric.com --user 230403 --otp-code 23434113 --protocol https --comment 'I love my bank' --random
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
And list your items:
|
|
|
|
```
|
2017-02-21 19:32:26 +00:00
|
|
|
mpw list
|
|
|
|
```
|
2017-03-02 22:43:19 +00:00
|
|
|
or search an item with
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw list --pattern love
|
2017-03-02 22:43:19 +00:00
|
|
|
mpw list --group bank
|
|
|
|
```
|
2017-02-21 19:32:26 +00:00
|
|
|
|
|
|
|
Output:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
Assurance
|
|
|
|
==========================================================================
|
|
|
|
ID | Host | User | OTP | Comment
|
|
|
|
==========================================================================
|
|
|
|
1 | https://assurance.com:443 | user_2132 | |
|
2017-02-21 19:32:26 +00:00
|
|
|
|
2017-05-20 13:42:28 +00:00
|
|
|
Bank
|
|
|
|
==========================================================================
|
|
|
|
ID | Host | User | OTP | Comment
|
|
|
|
==========================================================================
|
|
|
|
3 | https://fric.com | 230403 | X | I love my bank
|
2017-02-21 19:32:26 +00:00
|
|
|
```
|
2017-03-02 22:43:19 +00:00
|
|
|
|
|
|
|
Copy a password, login or OTP code:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw copy -p assurance.com
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Update an item:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw update -p assurance.com
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Delete an item:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw delete -p assurance.com
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Manage wallets
|
|
|
|
|
|
|
|
List all available wallets:
|
|
|
|
```
|
2017-05-20 13:42:28 +00:00
|
|
|
mpw wallet
|
2017-03-02 22:43:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
List all GPG keys in wallet:
|
|
|
|
```
|
|
|
|
mpw wallet --list-keys [--wallet NAME]
|
|
|
|
```
|
|
|
|
|
|
|
|
Share with an other GPG key:
|
|
|
|
```
|
|
|
|
mpw wallet --add-gpg-key test42@localhost.com
|
|
|
|
or
|
|
|
|
mpw wallet --add-gpg-key /path/to/file
|
|
|
|
```
|
|
|
|
|
|
|
|
Remove a GPG key:
|
|
|
|
```
|
|
|
|
mpw wallet --delete-gpg-key test42@localhost.com
|
|
|
|
```
|
|
|
|
|
2017-03-03 21:42:30 +00:00
|
|
|
### Export and import data
|
|
|
|
|
|
|
|
You can export your data in yaml file with your passwords in clear text:
|
|
|
|
```
|
|
|
|
mpw export --file export.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
Import data from an yaml file:
|
|
|
|
```
|
|
|
|
mpw import --file import.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
Example yaml file for mpw:
|
|
|
|
|
|
|
|
```
|
|
|
|
---
|
|
|
|
1:
|
2017-05-20 13:42:28 +00:00
|
|
|
host: fric.com
|
|
|
|
user: 230403
|
2017-03-03 21:42:30 +00:00
|
|
|
group: Bank
|
2017-05-20 13:42:28 +00:00
|
|
|
password: 5XdiTQOubRDw9B0aJoMlcEyL
|
2017-03-03 21:42:30 +00:00
|
|
|
protocol: https
|
2017-05-20 13:42:28 +00:00
|
|
|
port:
|
|
|
|
otp_key: 330223432
|
|
|
|
comment: I love my bank
|
2017-03-03 21:42:30 +00:00
|
|
|
2:
|
2017-05-20 13:42:28 +00:00
|
|
|
host: assurance.com
|
|
|
|
user: user_2132
|
|
|
|
group: Assurance
|
|
|
|
password: DMyK6B3v4bWO52VzU7aTHIem
|
2017-03-03 21:42:30 +00:00
|
|
|
protocol: https
|
2017-05-20 13:42:28 +00:00
|
|
|
port: 443
|
|
|
|
otp_key:
|
|
|
|
comment:
|
2017-03-03 21:42:30 +00:00
|
|
|
```
|
2017-04-22 08:25:19 +00:00
|
|
|
|
|
|
|
### Config
|
|
|
|
|
|
|
|
Print the current config
|
|
|
|
```
|
|
|
|
mpw config
|
|
|
|
```
|
|
|
|
|
|
|
|
Output:
|
|
|
|
|
|
|
|
```
|
|
|
|
Configuration
|
|
|
|
==============================================
|
|
|
|
lang | fr
|
|
|
|
gpg_key | mpw@yae.im
|
|
|
|
default_wallet |
|
|
|
|
config_dir | /home/mpw/.config/mpw
|
|
|
|
pinmode | true
|
|
|
|
gpg_exe |
|
|
|
|
path_wallet_test | /tmp/test.mpw
|
|
|
|
password_numeric | true
|
|
|
|
password_alpha | true
|
|
|
|
password_special | false
|
|
|
|
password_length | 16
|
|
|
|
|
|
|
|
```
|
2017-09-18 05:58:21 +00:00
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
Don't run the tests on your local machine, you risk to lost your datas.
|
|
|
|
|
|
|
|
### Test on local machine with docker
|
|
|
|
|
|
|
|
* install [docker](https://docs.docker.com/engine/installation/)
|
|
|
|
* run the tests
|
|
|
|
|
|
|
|
```
|
2017-11-19 12:54:17 +00:00
|
|
|
docker run -v $(pwd):/mpw:ro -it nishiki/ruby:stretch /bin/bash -l /mpw/.docker-test
|
2017-09-18 05:58:21 +00:00
|
|
|
```
|
2017-11-19 22:03:16 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
```
|
|
|
|
* Author:: Adrien Waksberg <mpw@yae.im>
|
|
|
|
|
|
|
|
Copyright (c) 2013-2017 Adrien Waksberg
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
```
|