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.
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.
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
15 \\$2 \(laURL: \\$1 \(ra\\$3
17 .if \n[.g] .mso www.tmac
18 .TH PWMD 1 "8 Feb 2010" "Password Manager Daemon" "Password Manager Daemon"
21 pwmd \- a universal data server
24 [options] [file1] [...]
28 is a daemon/server that serves clients data which is stored in an, optionally
29 encrypted and compressed, XML data file. Clients connect and send commands
30 that either retrieve or store data.
33 The following are the available command line options. Remaining arguments are
34 files to add to the cache on startup.
36 .I "\-\-rcfile, \-f rcfile"
37 Specify an alternate configuration file. The default is \fB~/.pwmd/config\fR.
40 .I "\-\-import, \-I filename \-\-outfile filename"
41 Imports an XML file. The XML file should be in conformance to the pwmd DTD.
42 See COMMANDS contained in the distributed pwmd archive for details. If
43 encryption is wanted (specified with the \fBiterations\fP configuration
44 parameter or the \fI\-\-iterations\fP command line switch), you will be
45 prompted for a passphrase to encrypt with. The output is written to the
46 filename specified with the \fI\-\-outfile\fP command line switch which should
47 then be placed in the configured \fBdata_directory\fP.
50 .I "\-\-iterations, \-i iterations
51 The number of encryption iterations to use when importing. When not specified,
52 the \fBiterations\fP configuration option from the \fBglobal\fP section will
56 .I "\-\-key\-file, \-k keyfile"
57 When importing (\fI\-\-import\fP) or converting (\fI\-\-convert\fP), obtain
58 the key from the specified filename. Only the first line is read from this
59 file. Be sure to set \fBkey_file\fP in your configuration.
62 .I "\-\-convert, \-C filename \-\-outfile filename"
63 Converts a \fBpwmd\fP version 1 data file to a version 2 data file. If
64 encrypted, you will be prompted for a passphrase to use for decryption (unless
65 using a \fI\-\-key-file\fP). The converted data file will be saved to the
66 filename specified with the \fI\-\-outfile\fP command line switch and with the
67 same passphrase and iterations as the version 1 data file.
70 .I "\-\-disable\-dump, \-D"
71 Disable the XPATH, LIST and DUMP protocol commands. This overrides any
72 \fBdisable_list_and_dump\fP configuration parameter.
75 .I "\-\-no\-fork, \-n"
76 Run as a foreground process.
79 .I "\-\-no\-pinentry, \-P"
82 use overriding any configuration setting.
92 .SH CONFIGURATION FILE
93 Blank lines and lines beginning with '#' are ignored. Some options can have
94 data file-specific settings by placing them in a file section. A file section
95 is declared by surrounding the filename with braces (i.e., \fI[filename]\fP).
96 Global options may be specified in a \fI[global]\fP section and are the
97 default options for new or unspecified files. If the first character of a
98 string value is a tilde, it will be expanded to your home directory. First the
101 .I "socket_path=<string>"
102 Listen on the specified socket. The default is \fI~/.pwmd/socket\fR.
105 .I "socket_perms=<integer>"
106 Permissions to set after creating the socket. This will override any
111 .I "allowed=<user,@group,...>"
112 A comma separated list of local usernames or group names allowed to connect to
113 the socket. Groups should be prefixed with a '@'. When not specified only the
114 invoking user may connect. The username is obtained via SO_PEERCRED.
117 .I "data_directory=<string>"
120 should store and retrieve data files. The default is \fI~/.pwmd/data\fR.
123 .I "disable_mlockall=<boolean>"
124 When set to \fBfalse\fP,
126 will be called after the client connects. This will use more physical memory
127 but may also be more secure. Most will probably find it overkill since the
128 contents of all allocated memory is cleared before being freed. Note that this
129 doesn't affect the file cache which is always stored in RAM (if possible).
132 .I "log_path=<string>"
133 Logs informational messages to the specified file. The default is
137 .I "enable_logging=<boolean>"
138 Enable or disable logging to \fIlog_path\fR. The default is \fBfalse\fR.
141 .I "syslog=<boolean>"
144 with facility LOG_DAEMON and priority LOG_INFO. The default is \fBfalse\fR.
147 .I "log_level=<integer>"
148 The logging level. When \fB0\fP, only connections and errors are logged. When
149 \fB1\fP, client commands are also logged. When \fB2\fP, the command arguments
150 are also logged. The default is \fB0\fP.
153 .I "debug_file=<string>"
154 When set, enable protocol debugging to the specified file. Note that this
155 logs all protocol IO so it may also log sensitive data.
158 .I "disable_list_and_dump=<boolean>"
159 When \fBtrue\fP, the \fBXPATH\fP, \fBLIST\fP and \fBDUMP\fP protocol commands
160 will be disabled and will return an error code.
163 .I "cache_push=<list>"
164 A list of filenames separated with commas that will be pushed into the file
167 will prompt for the key for each file specified unless the key was specified
168 with the \fIkey\fR or \fIkey_file\fR parameters in a matching file section.
172 .I "priority=<integer>"
173 The priority, or niceness, of the server. The default is inherited from the
177 Below are options that can be specified in the \fB[global]\fP or
178 \fB[filename]\fP section. If in both then \fB[filename]\fP will have
181 .I "backup=<boolean>"
182 Whether to create a backup of the data file when saving. The default is
183 \fBtrue\fP. The backup filename has the .backup extension appended to the
187 .I "cache_timeout=<integer>"
188 The number of seconds to keep the cache entry for this file. If \fB-1\fP, the
189 cache entry is kept forever. If \fB0\fP, each time the file is opened (if
190 encrypted) or saved a key will be required.
193 .I "enable_pinentry=<boolean>"
194 If \fBfalse\fP, disable the use of
196 When disabled and a file requires a passphrase, the passphrase must be
197 included in the command (see COMMANDS included in the archive). The default is
198 \fBtrue\fP. Also see \fBPINENTRY\fP below.
201 .I "pinentry_path=<string>"
202 The full path of the pinentry binary. The default is specified at compile
206 .I "pinentry_timeout=<integer>"
207 The number of seconds before the pinentry dialog will terminate while waiting
208 for a passphrase. The default is \fB20\fP. Set to \fB0\fP to wait forever.
211 .I "iterations=<integer>"
212 The number of times to encrypt the data. A value of 10000 or more will make
213 dictionary attacks very slow depending on the CPU and size of the data file.
214 The default is \fB1\fP iteration. Setting to \fB0\fP will disable encryption.
218 The default cipher to use when saving a data file. Valid values are:
219 \fBaes128\fP, \fBaes192\fP, \fBaes256\fP, \fBserpent128\fP, \fBserpent192\fP,
220 \fBserpent256\fP, \fBcamellia128\fP, \fBcamellia192\fP, \fBcamellia256\fP,
221 \fB3des\fP, \fBcast5\fP, \fBblowfish\fP, \fBtwofish128\fP and
222 \fBtwofish256\fP. The default is \fBaes256\fP.
225 .I "iteration_progress=<integer>"
226 After the specified number of iterations have been processed while encrypting
227 or decrypting, a status message with the keyword \fBPROGRESS\fP will be sent
228 to the client. Setting to \fB0\fP, the default, disables sending these
232 .I "xfer_progress=<integer>"
233 Commands that send data lines to the client can send the XFER status message
234 after the specified number of bytes have been sent. The number of bytes is
235 rounded to ASSUAN_LINELENGTH (1002).
239 The initial passphrase to use for this file. If specified in the
240 \fBglobal\fP section then "\fBglobal\fP" is treated as a data filename and
241 not a default for other files. Note that if a client changes the passphrase
242 for this data file with the \fBSAVE\fP command, then this value is not
243 modified and will need to be updated by hand.
246 .I "key_file=<string>"
247 Same as the \fBkey\fP option above but obtains the key from the specified
248 filename with the key being on the first line of the file. Note that if the
249 cache entry for this file gets removed then the only way to have it added
250 again is to restart \fBpwmd\fP or to re-read the configuration file (i.e., you
251 won't be prompted from pinentry).
254 .I "compression_level=<integer>"
255 The default compression level for data files from \fB1\fP to \fB9\fP, \fB1\fP
256 being the fastest but least compression and \fB9\fP being the slowest but best
257 compression. To disable compression entirely, set to \fB0\fP. The default is
261 .I "zlib_bufsize=<integer>"
262 The input and output buffer size when compressing and decompressing. This
263 affects how often the COMPRESS and DECOMPRESS status messages are sent and
264 also affects compression quality. The default is \fB65536\fP. Set to a higher
265 value for larger files.
268 .I "recursion_depth=<integer>"
269 The maximum number of times to resolve a target attribute for a single element
270 in an element path. An error is returned when this value is exceeded. The
271 default is \fB20\fP but can be disabled by setting to \fB0\fP.
274 .I "keepalive=<integer>"
275 Sends keep alive status messages to the client every N seconds. Set to \fB0\fP
276 to disable. The default is \fB0\fP.
280 When \fBenable_pinentry\fP is \fBtrue\fP, commands that require a key
283 to retrieve the passphrase. Since \fBpwmd\fP is normally a daemon process, it
284 isn't attached to any terminal. So \fBpinentry\fP needs to know where to put
285 it's dialog box by using command line options when executed. These can be set
286 by either using protocol commands (see COMMANDS included in the archive) or by
287 creating a file \fI~/.pwmd/pinentry.conf\fP. When using this file, each line
288 should contain NAME=VALUE pairs where NAME is one of:
291 The full path of the tty device.
295 The terminal type (i.e., vt100). Must be set when \fBTTYNAME\fP is set.
299 If using an X11 pinentry.
303 For internationalization.
307 For internationalization.
311 The full path to the pinentry binary. The default is \fI@pinentry@\fP.
314 The file is read only once after each client first connects. Note that if your
315 not using a \fBDISPLAY\fP, then both \fBTTYNAME\fP and \fBTTYTYPE\fP should be
316 set otherwise you'll get a segfault from ncurses.
321 Clears the entire file cache. If there are any clients connected, a key will
322 be required for the next \fBOPEN\fP or \fBSAVE\fP command.
325 Reloads the configuration file.
327 .B SIGTERM and SIGINT
328 Disallows new connections and waits for all clients to disconnect before
334 Default configuration file.
337 Default data directory.
340 Default listening socket.
343 Default log file when logging is enabled.
346 Default location of the pinentry binary.
348 .B ~/.pwmd/pinentry.conf
349 Default pinentry settings for new clients.
352 Ben Kibbey <bjk@luxsci.net>
354 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
359 Also see \fBCOMMANDS\fP included in the archive for protocol commands and