Blob


1 .\"
2 .\" Copyright (c) 2017 Matthias Schmidt
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\"
17 .Dd October 04, 2020
18 .Dt TPM 1
19 .Os
20 .Sh NAME
21 .Nm tpm
22 .Nd Simple command line password manager
23 .Sh SYNOPSIS
24 .Nm tpm
25 .Op Cm edit | find | insert | rm | show Ar entry
26 .Op Cm help
27 .Sh DESCRIPTION
28 The
29 .Nm
30 utility is a simple password manager for the command line.
31 It uses
32 .Xr gpg 1
33 to de- and encrypt passwords and stores the password in a tree-like
34 hierarchy.
35 It is modelled and somewhat compatible with
36 .Xr pass 1 .
37 .Pp
38 The options are as follows:
39 .Bl -tag -width Ds
40 .It Cm edit Ar entry
41 Allows the user to edit an existing password entry.
42 The password named
43 .Ar entry
44 is opened in a text editor.
45 If
46 .Ev EDITOR
47 is set this will be used, otherwise
48 .Nm
49 tries to use
50 .Xr vi 1 .
51 .It Cm find Ar entry
52 Searches for all passwords named
53 .Ar entry
54 and displays them.
55 This will display password entries as well
56 as directories with the same name.
57 .It Cm insert Ar entry
58 Asks the user for a password and creates a new encrypted
59 entry named
60 .Ar entry .
61 .It Cm rm Ar entry
62 Removes the password called
63 .Ar entry .
64 If the password does not exist an error will be shown.
65 .It Cm show Ar entry
66 Shows the password called
67 .Ar entry .
68 .It Cm help
69 Display usage instructions.
70 .El
71 .Pp
72 If no option is given
73 .Nm
74 displays the existing password hierarchy.
75 .Sh ENVIRONMENT
76 .Nm
77 can use the following environment variables:
78 .Bl -tag -width "PASSWORD_STORE_KEY"
79 .It Ev EDITOR
80 .Nm
81 will use the editor specified in
82 .Ev EDITOR
83 if the
84 .Cm edit
85 option is used.
86 Otherwise,
87 .Xr vi 1
88 will be used.
89 .It Ev NO_COLOR
90 If set to any value
91 .Nm
92 doesn't display colors.
93 The default is to display colors.
94 .It Ev PASSWORD_STORE_KEY
95 .Nm
96 can read the
97 .Xr gpg 1
98 identity used for encryption and decryption from this
99 variable.
100 See
101 .Sx FILES ,
102 below.
103 .El
104 .Sh FILES
105 .Bl -tag -width Ds -compact
106 .It Pa ~/.password-store
107 All passwords will be encrypted using
108 .Xr gpg 1
109 and stored under this directory.
110 .Pp
111 .It Pa ~/.password-store/.gpg-id
112 Contains one line with the
113 .Xr gpg 1
114 key used to en- and decrypt the password.
115 This could be something
116 like
117 .Aq user@example.com .
118 .El
119 .Sh EXIT STATUS
120 .Nm
121 normally exists with 0 or with 1 if an error occurred.
122 .Sh EXAMPLES
123 The following examples shows the basic usage of
124 .Nm .
125 To list all existing passwords in a tree just call
126 .Nm
127 without any arguments:
128 .Bd -literal -offset indent
129 $ tpm
130 /home/matthias/.password-store
131 |-- email
132 | |-- gmail
133 | |-- gmx
134 | `-- home
135 [...]
136 .Ed
137 .Pp
138 If you want to save the password for one of your servers you
139 can create a new entry called
140 .Ar server
141 under the parent-directory called
142 .Ar logins
143 call
144 .Nm
145 as follows:
146 .Bd -literal -offset indent
147 $ tpm insert logins/server
148 Password for 'logins/server':
149 .Ed
150 .Pp
151 Enter the password - that will not be displayed - and it will be saved
152 encrypted in your password store directory.
153 .Pp
154 If you have multiple
155 .Xr gpg 1
156 keys you can set which key should be used by
157 .Nm
158 for all cryptographic operations.
159 Also see Section
160 .Sx FILES .
161 .Bd -literal -offset indent
162 $ echo "user@example.com" > ~/.password-store/.gpg-id
163 .Ed
164 .Sh SEE ALSO
165 .Xr colortree 1 ,
166 .Xr gpg 1 ,
167 .Xr tree 1
168 .Sh AUTHORS
169 .Nm
170 was originally written by
171 .An Sören Tempel Aq Mt soeren+git@soeren-tempel.net .
172 .Pp
173 This version was enhanced and mostly rewritten by
174 .An Matthias Schmidt Aq Mt matthias@dragonflybsd.org .