Version 1.16.
[pwmd.git] / doc / pwmd.1.in
blobf455333ecee32ed07571764bd08978f4c6c0ec8a
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 "04 Jan 2009" "Password Manager Daemon" "Password Manager Daemon"
19 .SH NAME
21 pwmd \- local socket data server
22 .SH SYNOPSIS
23 .B pwmd
24 [\-hv] [\-f <rcfile>] [\-I <filename> [-i <iterations>] [\-k <keyfile>]] [\-D] [\-n] [file] [...]
26 .SH DESCRIPTION
27 .B pwmd
28 is a daemon that listens for connections on a local socket. Clients connect to
29 the server and can retrieve or modify "account" data. The word "account" is
30 just a placeholder for the element describing and item. But what the data
31 actually is can be anything. The data is stored in an (optionally AES256
32 encrypted) XML file.
34 .SH OPTIONS
35 The following are the available command line options. Remaining arguments are
36 files to add to the cache on startup.
37 .TP
38 .I "\-f rcfile"
39 Specify an alternate configuration file. The default is \fI~/.pwmd/config\fR.
40 .TP
41 .I "\-I filename"
42 Import an XML file prompting for a key to use for encryption. The encrypted
43 data will be written to stdout. This output should be redirected to a file
44 which is placed in the configured \fIdata_directory\fP.
45 .TP
46 .I "\-i iterations
47 The number of encryption iterations when importing. When not specified, the
48 configuration file default will be used from the \fIglobal\fP section.
49 .TP
50 .I "\-k filename"
51 When importing, use the key stored in the specified key file.
52 .TP
53 .I "\-D"
54 Disable the XPATH, LIST and DUMP protocol commands.
55 .TP
56 .I "\-n"
57 Run as a foreground process.
58 .TP
59 .I "\-v"
60 Version information.
61 .TP
62 .I "\-h"
63 Help text.
65 .SH CONFIGURATION FILE
66 Blank lines and lines beginning with '#' are ignored. Some options can be
67 grouped together to have file specific settings. A file section is declared by
68 surrounding the filename with braces (i.e., \fI[filename]\fP). Global options
69 may be specified in a \fI[global]\fP section and are the defaults for other
70 file sections. If the first character of a string value is a tilde, it will be
71 expanded to your home directory. First the global options:
72 .TP
73 .I "socket_path=<string>"
74 Listen on the specified socket. The default is \fI~/.pwmd/socket\fR.
75 .TP
76 .I "socket_perms=<integer>"
77 Permissions to set after creating the socket. This will override any
78 .BR umask (2)
79 setting.
80 .TP
81 .I "data_directory=<string>"
82 Where
83 .B pwmd
84 should store and retrieve data files. The default is \fI~/.pwmd/data\fR.
85 .TP
86 .I "disable_mlockall=<boolean>"
87 When set to \fBfalse\fP,
88 .BR mlockall (2)
89 will be called after the client connects. This will use alot more physical
90 memory but may also be more secure. Most will probably find it overkill since
91 the contents of all memory is cleared before being freed. Note that this
92 doesn't affect the file cache which is always stored in RAM (if possible).
93 .TP
94 .I "cache_size=<integer>"
95 Specfies the size of the file cache. Must be in multiples of your systems
96 \fBPAGE_SIZE\fR. The default is one page.
97 .TP
98 .I "log_path=<string>"
99 Logs informational messages to the specified file. The default is
100 \fI~/.pwmd/log\fR.
102 .I "enable_logging=<boolean>"
103 Enable or disable logging to \fIlog_path\fR. The default is \fIfalse\fR.
105 .I "syslog=<boolean>"
106 Enable logging to
107 .BR syslog (8)
108 with facility LOG_DAEMON and priority LOG_INFO. The default is \fIfalse\fR.
110 .I "disable_list_and_dump=<boolean>"
111 When \fItrue\fP, the \fBXPATH\fP, \fBLIST\fP and \fBDUMP\fP protocol commands
112 will be disabled and will return an error code.
114 .I "cache_push=<list>"
115 A list of filenames separated by commas that will be pushed into the file
116 cache upon startup.
117 .B pwmd
118 will ask for the key for each file specified unless the key was specified with
119 the \fBkey\fR or \fBkey_file\fR parameters in a matching file section. The
120 default is none.
122 .I "priority=<integer>"
123 The priority, or niceness, of the server. The default is inherited from the
124 parent process.
126 Below are options that can be in the \fI[global]\fP or \fI[filename]\fP
127 section. If in both then \fI[filename]\fP will have precedence.
129 .I "backup=<boolean>"
130 Whether a backup of the data file should be kept when saving. The default is
131 \fItrue\fP. The backup filename has the .backup extension appended to the
132 opened file.
134 .I "cache_timeout=<integer>"
135 The number of seconds for the life of the cached file. If \fI-1\fP, the file
136 is cached forever. If \fI0\fP, each time the file is opened or saved a key
137 will be required.
139 .I "enable_pinentry=<boolean>"
140 If \fIfalse\fP, disable the use of
141 .BR pinentry (1).
142 The default is \fItrue\fP. Also see \fBPINENTRY\fP below.
144 .I "pinentry_timeout=<integer>"
145 The number of seconds before the pinentry dialog will terminate while waiting
146 for a password. Set to \fI0\fP to wait forever.
148 .I "iterations=<integer>"
149 The number of times to encrypt the data. A value of 10000 or more will make
150 dictionary attacks very slow depending on the CPU. The default is \fI0\fP
151 which is really 1 iteration (data file compatibility bug). Setting to \fI-1\fP
152 will disable encryption.
154 .I "iteration_progress=<integer>"
155 After the specified number of iterations while encrypting or decrypting, a
156 status message with the keyword \fBPROGRESS\fP will be sent to the client.
157 Setting to \fI0\fP, the default, disables sending progress messages.
159 .I "key=<string>"
160 The initial key to use for this file. If specified in the \fI[global]\fP
161 section then "\fIglobal\fP" is treated as a filename and not a default for
162 other files. Note that if a client changes the key this value is not modified
163 and will need to be updated by hand.
165 .I "key_file=<string>"
166 Same as above but obtain the key from the specified filename with the key
167 being on the first line of the file. Note that if you change the key when
168 connected this value is not modified and will need to be updated by hand.
170 .I "compression_level=<integer>"
171 The default compression level for data files from \fI1\fP to \fI9\fP, \fI1\fP
172 being the fastest but least compression and \fI9\fP being the slowest but best
173 compression. To disable compression entirely, set to \fI0\fP. The default is
174 \fI6\fP.
176 .I "zlib_bufsize=<integer>"
177 The input and output buffer size when compressing and decompressing. This
178 affects how often the COMPRESS and DECOMPRESS status messages are sent and
179 also affects compression quality. The default is \fB65536\fP. Set to a higher
180 value for larger files.
182 .I "recursion_depth=<integer>"
183 The maximum number of times to resolve a target attribute for a single element
184 in an element path. An error is returned when this value is exceeded. The
185 default is \fI20\fP but can be disabled by setting to \fI0\fP.
187 .I "keepalive=<integer>"
188 Sends keep alive status messages to the client every N seconds. Set to \fI0\fP
189 to disable. The default is \fI5\fP.
191 .SH PINENTRY
193 When \fIenable_pinentry\fP is \fBtrue\fP, commands that require a key that
194 isn't cached or specified with the command, will use
195 .BR pinentry (1)
196 to retrieve the passphrase. Since \fBpwmd\fP is a daemon process, it isn't
197 attached to any terminal. So \fBpinentry\fP needs to know where to put it's
198 dialog box by using command line options when executed. These can be set by
199 either using protocol commands (see COMMANDS included in the archive) or by
200 creating a file \fI~/.pwmd/pinentry.conf\fP. When using the file, each line should
201 contain NAME=VALUE pairs where NAME is one of:
203 .B TTYNAME
204 The full path of the tty device.
206 .B TTYTYPE
207 The terminal type (i.e., vt100).
209 .B DISPLAY
210 If using an X11 pinentry.
212 .B PATH
213 The full path to the pinentry binary. The default is \fI@pinentry@\fP.
215 The file is read only once after each client first connects. Note that if your
216 not using a \fBDISPLAY\fP, then both \fBTTYNAME\fP and \fBTTYTYPE\fP should be
217 set otherwise you'll get a segfault from ncurses.
219 .SH SIGNALS
221 .B SIGUSR1
222 Clears the entire file cache. If there are any clients connected, a key will
223 be required for the next \fBOPEN\fP or \fBSAVE\fP command.
225 .B SIGHUP
226 Reloads the configuration file.
228 .B SIGTERM and SIGINT
229 Disallows new connections and waits for all clients to disconnect before
230 terminating.
232 .SH FILES
234 .B ~/.pwmd/config
235 Default configuration file.
237 .B ~/.pwmd/data
238 Default data directory.
240 .B ~/.pwmd/socket
241 Default listening socket.
243 .B ~/.pwmd/log
244 Default log file when logging is enabled.
246 .B @pinentry@
247 Default location of the pinentry binary.
249 .B ~/.pwmd/pinentry.conf
250 Default pinentry settings for new clients.
252 .SH AUTHOR
253 Ben Kibbey <bjk@luxsci.net>
255 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
257 .SH "SEE ALSO"
258 .BR mlock (2),
259 .BR mlockall (2),
260 .BR libxml (3) ,
261 .BR mmap (2),
262 .BR pinentry (1)
264 Also see \fBCOMMANDS\fP included in the archive for protocol commands and
265 syntax.