Make sure the STORE command has following data.
[libpwmd.git] / pwmc.1.in
blob328ed1484545f33b94b713d59c51cfdcfba6e259
1 .\" This program is free software; you can redistribute it and/or modify
2 .\" it under the terms of the GNU General Public License as published by
3 .\" the Free Software Foundation; either version 2 of the License, or
4 .\" (at your option) any later version.
5 .\" 
6 .\" This program is distributed in the hope that it will be useful,
7 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
8 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 .\" GNU General Public License for more details.
10 .\" 
11 .\" You should have received a copy of the GNU General Public License
12 .\" along with this program; if not, write to the Free Software
13 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
14 .de URL
15 \\$2 \(laURL: \\$1 \(ra\\$3
17 .if \n[.g] .mso www.tmac
18 .TH PWMD 1 "22 Nov 2007" "Password Manager Client" "Password Manager Client"
19 .SH NAME
21 pwmc \- send commands to pwmd
22 .SH SYNOPSIS
23 .B pwmc
24 [\-hvX] [\-s <socket>] [\-a [\-P <pinentry_path>] [\-D <display>] [\-T
25 <tty>] [\-N <term>] [\-t <seconds>] | \-p <password>] [\-S] [\-d <descriptor>]
26 [filename]
28 .SH DESCRIPTION
29 .B pwmc
30 is a
31 .BR libpwmd (3)
32 client for \fBpwmd\fR. Commands are read line-by-line from stdin until an EOF
33 occurs. Element content or value set with the STORE command that contains
34 either newline or tab characters should be base64 encoded. The
35 .BR openssl (1)
36 utility can do this and can make the base64 encoded string on one line
37 with the 'base64 -A' switch.
39 .SH OPTIONS
40 .TP
41 .I "\-X"
42 Disable showing of status messages from the server. By default they are
43 printed to stderr.
44 .I "\-s <socket>"
45 Connect to the specified socket. The default is \fB~/.pwmd/socket\fR.
46 .TP
47 .I "\-a"
48 Use 
49 .BR pinentry (1)
50 for password retrieval.
51 .TP
52 .I "\-P <path>"
53 The full path of the
54 .BR pinentry (1)
55 program. \fBlibpwmd\fP defaults to \fI@pinentry_path@\fP.
56 .TP
57 .I "\-D <display>"
58 The pinentry display to use.
59 .TP
60 .I "\-T <tty>"
61 The full path of the tty for pinentry to use.
62 .TP
63 .I "\-N <term>"
64 The terminal type for pinentry to use. This is required when using 
65 .B -T
66 if the invoking
67 .B pwmc
68 isn't attached to a terminal.
69 .TP
70 .I "\-t <seconds>"
71 When opening a file and a password is required,
72 .BR pinentry (1)
73 will timeout after the specified amount of seconds. When saving a file and a
74 password is required, no timeout will be used even if specified.
75 .TP
76 .I "\-p <password>"
77 Use the specified password.
78 .TP
79 .I "\-S"
80 Send the SAVE command after EOF.
81 .TP
82 .I "\-d <descriptor>"
83 Writes the results of successful commands to the specified file descriptor.
84 This may be needed if your using pinentry to retrieve a password but
85 redirecting command results.
86 .TP
87 .I "\-v"
88 Version information.
89 .TP
90 .I "\-h"
91 Help text.
93 .SH EXAMPLES
94 To list the available accounts and use
95 .BR pinentry (1)
96 to get the password:
97 .RS
98 echo list | pwmc -a filename
99 .RE
101 To store an element path and save the file afterwards:
103 echo -e 'store isp\\tsmtp\\thostname\\tsomehost.com' | pwmc -S filename
106 Clear the file cache for a single file:
108 echo 'clearcache filename' | pwmc
111 Multiple commands in one instance:
113 echo -e 'get isp\\tsmtp\\thostname\\nget isp\\tusername' | pwmc filename
116 Base 64 encoded content:
118 echo -e 'store blah\\tstuff\\t'`cat file | openssl base64 -A` | pwmc filename
120 Then to get the content:
122 echo -e 'get blah\\tstuff' | pwmc filename | openssl base64 -d -A
125 .SH FILES
127 .B ~/.pwmd/socket
128 Default socket to connect to.
130 .B @pinentry_path@
131 Default location of the pinentry binary.
134 .SH AUTHOR
135 Ben Kibbey <bjk@luxsci.net>
137 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
139 .SH "SEE ALSO"
140 .BR pwmd (1),
141 .BR pinentry (1),
142 .BR openssl (1),
143 .BR libpwmd (3)