-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathopm.1
151 lines (151 loc) · 4.18 KB
/
opm.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
.\" $OpenBSD$
.\"
.\" Copyright (c) 2018 Robert Nagy <[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: October 5 2018 $
.Dt OPM 1
.Os
.Sh NAME
.Nm opm
.Nd whatever password manager
.Sh SYNOPSIS
.Nm opm
.Op Fl bcdhkm
.Op Fl C clipboard
.Op Fl S file
.Op Fl P file
.Op Fl p file
.Op Fl S file
.Op Fl s file
.Op command
.Sh DESCRIPTION
.Nm
is a simple password manager utilizing
.Xr openssl 1
and
.Xr signify 1 .
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl b
Enable batch mode for listing the entries, avoiding the tree output.
.It Fl c
Use
.Xr xclip 1
to copy the password to the clipboard for one time paste only.
.It Fl d
Turn on debug messages.
.It Fl h
Highlight the output on the console.
.It Fl k
Use
.Xr secret-tool 1
to query the gnome-keyring for the store password.
.It Fl m
The content is multi-line.
This option forces the use of the $EDITOR for adding
entries.
.It Fl C Ar clipboard
Specifies which clipboard to use.
Defaults to
.Pa primary .
This options also sets the
.Fl c
option automatically.
.It Fl S Ar file
Path to the signify private key.
.It Fl P Ar file
Path to the signify public key.
.It Fl s Ar file
Path to the user's private key.
.It Fl p Ar file
Path to the user's public certificate.
.El
.Pp
The following commands are available:
.Bl -tag -width Ds
.It Cm add | insert Ar group/entry
Add a new entry to the specified path.
.It Cm del | rm Ar group/entry
Remove the specified entry.
.It Cm list | ls
Show the list of existing entries.
.It Cm encrypt Ar group/entry
Re-encrypt the specified path.
If no path is specified, all entries will be re-encrypted.
.It Cm show | get Ar group/entry
Show the contents of an entry after decryption.
.It Cm verify
Verify the integrity of the files using
.Xr signify 1 .
.It Cm search Ar string
Search for the specified string in entry names.
.El
.Sh FILES
.Bl -tag -width "~/.opm/private/signify.sec" -compact
.It Pa ~/.opm/private/alice.key
Private key for the user used for decryption.
.It Pa ~/.opm/private/alice.pub
Public key for the user used for encryption.
.It Pa ~/.opm/private/signify.sec
.Xr signify 1
private key used for creating a signature.
.It Pa ~/.opm/private/signify.pub
.Xr signify 1
public key used for verifying a signature.
.It Pa ~/.opm/store/*
Encrypted password store.
.It Pa ~/.opm/store/*/*/.team
Any .team directory in a path is used to store public certificates.
Any certificate in these directories will be used while encrypting an entry, providing basic team support.
.El
.Sh EXAMPLES
Create a password protected private key and certificate for the desired users:
.Bd -literal -offset indent
$ openssl req -x509 -newkey rsa:4096 -days 365 \e
-subj "/C=HU/ST=*/L=*/O=*/OU=*/CN=Alice/" \e
-keyout alice.key -out alice.pub
.Ed
.Pp
Optionally one can use an already existing ssh private key to generate a public
certificate:
.Bd -literal -offset indent
$ openssl req -x509 -new -key ~/.ssh/id_rsa -days 365 \e
-subj "/C=HU/ST=*/L=*/O=*/OU=*/CN=Alice/" \e
-out alice.pub
.Ed
.Pp
Create a new key pair for signify:
.Bd -literal -offset indent
$ signify -G -p signify.pub -s signify.sec
.Ed
.Pp
.Nm
will look for these files depending on if you are doing encryption or decryption.
Please refer to the FILES section for placement of these files.
.Pp
If you would like to have basic
.Xr ksh 1
completion for entries, you can add this to your .profile:
.Bd -literal -offset indent
set -A complete_opm -- $(opm -b list | xargs)
.Ed
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr signify 1
.Sh AUTHORS
.Nm
was written by
.An Robert Nagy Aq Mt [email protected] .