forked from tamentis/mdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdp.1
182 lines (182 loc) · 6.22 KB
/
mdp.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.\"
.\" Copyright (c) 2012-2013 Bertrand Janin <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 15 2013 $
.Dt MDP 1
.Os
.Sh NAME
.Nm mdp
.Nd minimalist password safe
.Sh SYNOPSIS
.Nm mdp
.Bk -words
.Op Fl c Ar config
.Op Fl erq
.Op Ar keyword ...
.Ek
.Sh DESCRIPTION
.Nm
is an acronym for "Mot de Passe" which means "password" in French. It wraps
GnuPG for encryption and deals with all the small details of generating,
managing and fetching your passwords.
.Pp
.Nm
is similar to a dozen other programs. What differentiate it from others is an
overall goal for simplicity, not your average button-driven simplicity but more
like a Unix-y less is more style. For example, beyond the use of GnuPG for
encryption,
.Nm
lets you use your own editor to manage your passwords, categorize them and
delete them. I wouldn't use anything but my favorite editor to manage a list,
would you?
.Pp
In order to avoid passwords to linger on your screen, the results from the
queries are displayed through a custom pager that gets cleared after a
customizable timeout (default 10 seconds).
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl c Ar config
Use an alternate configuration file.
.It Fl e
Edit your password file (decrypt and re-encrypt after the fact).
.It Fl q
Start
.Nm
in query mode instead of displaying results directly. This will avoid you
from entering your GPG password multiple time. Query mode times out after
a few seconds of inactivity.
.It Fl r
Displays the result without pager, plain terminal dump.
.It Fl g Ar length
Generates 4 passwords of the given length.
.It Fl V
Print version.
.It Fl h
Print usage.
.El
.Sh USAGE
.Bl -tag -width Ds
.It 1. Create your GPG key if you don't already have one.
.It 2. Setup your EDITOR variable if it's not already done.
.It 3. Create a .mdp/config file from the example (at least gpg_key_id).
.It 4. Pick a password from randomly generated ones (e.g. 16 chars):
.Bd -literal -offset indent
mdp -g 16
.Ed
.It 5. Run "mdp -e" and add a line like such:
.Bd -literal -offset indent
twitter [email protected] yHVHPnqXyx6qUuki
.Ed
.It 6. Now when you need your Twitter password, you can just type:
.Bd -literal -offset indent
mdp twitter
.Ed
.El
.Sh CONFIGURATION
This is a summary of all the available configuration variables and options:
.Bl -tag -width Ds
.It Xo Ic set gpg_path Ar path
.Xc
GnuPG absolute path (default: /usr/bin/gpg)
.Pp
.It Ic set gpg_key_id Ar key_id
GnuPG key id (default: none). If no key is selected, gpg will attempt to pick
the key bound to the password file. When saving the file, you will be
prompted to pick the encryption key. This can get quickly annoying, you're
highly suggested to set this value.
.Pp
.It Ic set gpg_timeout Ar seconds
Number of seconds to give GnuPG for password and pipe interaction. The
default value is 10 seconds. This will kill GnuPG if you leave it on the
password prompt or of anything blocks it while it communicates with the
parent process.
.Pp
.It Ic set editor Ar path
Path to your favorite editor. You typically don't need to set this variable
since
.Nm
will use your default editor (as defined by $EDITOR).
.Pp
.It Ic set password_count Ar count
Define how many password to show when using -g. Default: 4.
.Pp
.It Ic set timeout Ar seconds
This variable define how long the pager will display your passwords. The
default value is 10 seconds.
.Nm
will use your default editor (as defined by $EDITOR).
.El
.Sh FAQ
.Bl -tag -width Ds
.It Why not 'shred' the temporary file?
If you're afraid of getting your disk stolen, encrypt it. Shred only
has limited use on most filesystems (due to journaling for example).
.It What if I don't trust 'root'?
You're screwed, you can't trust this machine with your valuable information.
.It What if my server is virtualized?
Same answer as above, but I certainly hope you can trust your hosting
or IaaS provider.
.El
.Sh ENVIRONMENT
.Bl -tag
.It Ev EDITOR
The content of this variable will be used as default editor if the
configuration does not alter it.
.El
.Sh FILES
.Bl -tag
.It Pa $HOME/.mdp/config
Main configuration file for
.Nm .
You should seriously consider putting at least your gpg_key_id in there.
.It Pa $HOME/.mdp/passwords
Encrypted list of passwords.
.It Pa $HOME/.mdp/passwords.bak
This file is a copy of your password file, before the last edit. Only one
copy is kept in case you with to revert your last change. You can override
the main password file with this one to do that.
.It Pa $HOME/.mdp/lock
This file is created while you edit your password list to avoid two copies
of mdp to run at the same time for the same user.
.El
.Sh SEE ALSO
.Xr gpg 1 ,
.Xr sh 1
.Sh BUGS
None so far.
.Sh AUTHORS
mdp was written by Bertrand Janin <[email protected]> and is distributed under an ISC
license (BSD compatible, OSI compatible).
.Pp
A bunch of utility functions are borrowed from OpenBSD and OpenSSH, both
under ISC and BSD licenses, with copyrights from the following authors:
.Pp
Copyright (c) 2004 Ted Unangst and Todd Miller
Copyright (c) 1998 Todd C. Miller <[email protected]>
Copyright (c) 2000 Markus Friedl. All rights reserved.
Copyright (c) 2005,2006 Damien Miller. All rights reserved.
.Pp
The random password generator was mostly borrowed from apg (also BSD
licensed), with the following copyright notice:
.Pp
Copyright (c) 1999, 2000, 2001, 2002, 2003
Adel I. Mirzazhanov. All rights reserved
.Pp
The array and xmalloc libraries are taken from tmux, with the following
copyright notices:
.Pp
Copyright (c) 2004 Nicholas Marriott <[email protected]>
Copyright (c) 2006 Nicholas Marriott <[email protected]>