Added pwmd_command_ap(). This makes pwmd_command() a wrapper around this
[libpwmd.git] / pwmc.1.in
blobbe7ae2e8ae5f07161d6f1fb1c6c9ed61582b4940
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  02110-1301  USA
14 .de URL
15 \\$2 \(laURL: \\$1 \(ra\\$3
17 .if \n[.g] .mso www.tmac
18 .TH PWMD 1 "21 Jun 2008" "Password Manager Client" "Password Manager Client"
19 .SH NAME
21 pwmc \- send a command to pwmd
22 .SH SYNOPSIS
23 .B pwmc
24 [\-hvX] [\-s <socket>] [[\-P <pinentry_path>] [\-D <display>] [\-T
25 <tty>] [\-N <term>] | \-p <password>] [\-c <name>] [\-S [\-i <iter>]]
26 [\-t <seconds>] [\-d <fd>]
27 [\-I <fd>] [filename]
29 .SH DESCRIPTION
30 .B pwmc
31 is a
32 .BR libpwmd (3)
33 client for
34 .BR pwmd (1) .
35 A command is read from standard input and output is sent to either a file
36 descriptor or standard output.
38 .SH OPTIONS
39 .TP
40 .I "\-X"
41 Disable showing of status messages from the server. By default they are
42 printed to stderr.
43 .I "\-s <socket>"
44 Connect to the specified socket. The default is \fB~/.pwmd/socket\fR.
45 .TP
46 .I "\-t <seconds>"
47 The number of seconds before pinentry will terminate while waiting for a
48 password. If not specified the server default will be used.
49 .TP
50 .I "\-P <path>"
51 The full path of the
52 .BR pinentry (1)
53 program. The default is specified at
54 .BR pwmd (1)
55 compile time.
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 "\-p <password>"
71 Use the specified password. When not specified and the file is not cached,
72 .BR pinentry (1)
73 will be used.
74 .TP
75 .I "\-S"
76 Send the SAVE command before exiting.
77 .TP
78 .I "\-i"
79 Encrypt with the specified number of iterations when saving. Note that
80 \fI-1\fP disables encryption and that \fI0\fP is really 1 iteration.
81 .TP
82 .I "\-d <descriptor>"
83 Writes the result of a command to the specified file descriptor. This may be
84 needed if your using pinentry to retrieve a password but redirecting standard
85 output.
86 .I "\-I <descriptor>"
87 Reads INQUIRE data from the specified file descriptor. Use this rather than
88 piping large amounts of data to save memory.
89 .TP
90 .I "\-c <name>"
91 Sets the client name to the specified string which will show up in log
92 messages.
93 .TP
94 .I "\-v"
95 Version information.
96 .TP
97 .I "\-h"
98 Help text.
100 .SH EXAMPLES
101 To list the available accounts and use
102 .BR pinentry (1)
103 to get the password:
105 echo list | pwmc filename
108 To store an element path and save the file afterwards:
110 echo -ne 'store isp\\tsmtp\\thostname\\tsomehost.com' | pwmc -S filename
113 Store a large file:
115 echo -en 'store blah\\tstuff\\t' | pwmc -S -I 3 filename 3<data_file
117 And then to get the content:
119 echo -e 'get blah\\tstuff' | pwmc filename
122 Clear the file cache for a single file:
124 echo 'clearcache filename' | pwmc
127 .SH FILES
129 .B ~/.pwmd/socket
130 Default socket to connect to.
132 .B @pinentry@
133 Default location of the
134 .BR pinentry (1)
135 binary.
137 .SH AUTHOR
138 Ben Kibbey <bjk@luxsci.net>
140 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
142 .SH "SEE ALSO"
143 .BR pwmd (1),
144 .BR pinentry (1),
145 .BR libpwmd (3)