-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtpm.1
174 lines (174 loc) · 3.93 KB
/
tpm.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
.\"
.\" Copyright (c) 2017 Matthias Schmidt
.\"
.\" 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 October 04, 2020
.Dt TPM 1
.Os
.Sh NAME
.Nm tpm
.Nd Simple command line password manager
.Sh SYNOPSIS
.Nm tpm
.Op Cm edit | find | insert | rm | show Ar entry
.Op Cm help
.Sh DESCRIPTION
The
.Nm
utility is a simple password manager for the command line.
It uses
.Xr gpg 1
to de- and encrypt passwords and stores the password in a tree-like
hierarchy.
It is modelled and somewhat compatible with
.Xr pass 1 .
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Cm edit Ar entry
Allows the user to edit an existing password entry.
The password named
.Ar entry
is opened in a text editor.
If
.Ev EDITOR
is set this will be used, otherwise
.Nm
tries to use
.Xr vi 1 .
.It Cm find Ar entry
Searches for all passwords named
.Ar entry
and displays them.
This will display password entries as well
as directories with the same name.
.It Cm insert Ar entry
Asks the user for a password and creates a new encrypted
entry named
.Ar entry .
.It Cm rm Ar entry
Removes the password called
.Ar entry .
If the password does not exist an error will be shown.
.It Cm show Ar entry
Shows the password called
.Ar entry .
.It Cm help
Display usage instructions.
.El
.Pp
If no option is given
.Nm
displays the existing password hierarchy.
.Sh ENVIRONMENT
.Nm
can use the following environment variables:
.Bl -tag -width "PASSWORD_STORE_KEY"
.It Ev EDITOR
.Nm
will use the editor specified in
.Ev EDITOR
if the
.Cm edit
option is used.
Otherwise,
.Xr vi 1
will be used.
.It Ev NO_COLOR
If set to any value
.Nm
doesn't display colors.
The default is to display colors.
.It Ev PASSWORD_STORE_KEY
.Nm
can read the
.Xr gpg 1
identity used for encryption and decryption from this
variable.
See
.Sx FILES ,
below.
.El
.Sh FILES
.Bl -tag -width Ds -compact
.It Pa ~/.password-store
All passwords will be encrypted using
.Xr gpg 1
and stored under this directory.
.Pp
.It Pa ~/.password-store/.gpg-id
Contains one line with the
.Xr gpg 1
key used to en- and decrypt the password.
This could be something
like
.Aq [email protected] .
.El
.Sh EXIT STATUS
.Nm
normally exists with 0 or with 1 if an error occurred.
.Sh EXAMPLES
The following examples shows the basic usage of
.Nm .
To list all existing passwords in a tree just call
.Nm
without any arguments:
.Bd -literal -offset indent
$ tpm
/home/matthias/.password-store
|-- email
| |-- gmail
| |-- gmx
| `-- home
[...]
.Ed
.Pp
If you want to save the password for one of your servers you
can create a new entry called
.Ar server
under the parent-directory called
.Ar logins
call
.Nm
as follows:
.Bd -literal -offset indent
$ tpm insert logins/server
Password for 'logins/server':
.Ed
.Pp
Enter the password - that will not be displayed - and it will be saved
encrypted in your password store directory.
.Pp
If you have multiple
.Xr gpg 1
keys you can set which key should be used by
.Nm
for all cryptographic operations.
Also see Section
.Sx FILES .
.Bd -literal -offset indent
$ echo "[email protected]" > ~/.password-store/.gpg-id
.Ed
.Sh SEE ALSO
.Xr colortree 1 ,
.Xr gpg 1 ,
.Xr tree 1
.Sh AUTHORS
.Nm
was originally written by
.An Sören Tempel Aq Mt [email protected] .
.Pp
This version was enhanced and mostly rewritten by
.An Matthias Schmidt Aq Mt [email protected] .