Imported Upstream version 2.6.1
[debian/amanda] / man / amanda-auth.7
1 .\"     Title: amanda-auth
2 .\"    Author: Jean-Louis Martineau <martineau@zmanda.com>
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4 .\"      Date: 01/22/2009
5 .\"    Manual: Miscellanea
6 .\"    Source: Amanda 2.6.1
7 .\"  Language: English
8 .\"
9 .TH "AMANDA\-AUTH" "7" "01/22/2009" "Amanda 2\&.6\&.1" "Miscellanea"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 .de toupper
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18 \\$*
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20 ..
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 .de SH-xref
25 .ie n \{\
26 .\}
27 .toupper \\$*
28 .el \{\
29 \\$*
30 .\}
31 ..
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .de1 SH
36 .\" put an extra blank line of space above the head in non-TTY output
37 .if t \{\
38 .sp 1
39 .\}
40 .sp \\n[PD]u
41 .nr an-level 1
42 .set-an-margin
43 .nr an-prevailing-indent \\n[IN]
44 .fi
45 .in \\n[an-margin]u
46 .ti 0
47 .HTML-TAG ".NH \\n[an-level]"
48 .it 1 an-trap
49 .nr an-no-space-flag 1
50 .nr an-break-flag 1
51 \." make the size of the head bigger
52 .ps +3
53 .ft B
54 .ne (2v + 1u)
55 .ie n \{\
56 .\" if n (TTY output), use uppercase
57 .toupper \\$*
58 .\}
59 .el \{\
60 .nr an-break-flag 0
61 .\" if not n (not TTY), use normal case (not uppercase)
62 \\$1
63 .in \\n[an-margin]u
64 .ti 0
65 .\" if not n (not TTY), put a border/line under subheading
66 .sp -.6
67 \l'\n(.lu'
68 .\}
69 ..
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 .de1 SS
74 .sp \\n[PD]u
75 .nr an-level 1
76 .set-an-margin
77 .nr an-prevailing-indent \\n[IN]
78 .fi
79 .in \\n[IN]u
80 .ti \\n[SN]u
81 .it 1 an-trap
82 .nr an-no-space-flag 1
83 .nr an-break-flag 1
84 .ps \\n[PS-SS]u
85 \." make the size of the head bigger
86 .ps +2
87 .ft B
88 .ne (2v + 1u)
89 .if \\n[.$] \&\\$*
90 ..
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 .de BB
95 .if t \{\
96 .sp -.5
97 .br
98 .in +2n
99 .ll -2n
100 .gcolor red
101 .di BX
102 .\}
103 ..
104 .de EB
105 .if t \{\
106 .if "\\$2"adjust-for-leading-newline" \{\
107 .sp -1
108 .\}
109 .br
110 .di
111 .in
112 .ll
113 .gcolor
114 .nr BW \\n(.lu-\\n(.i
115 .nr BH \\n(dn+.5v
116 .ne \\n(BHu+.5v
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119 .\}
120 .el \{\
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122 .\}
123 .in 0
124 .sp -.5v
125 .nf
126 .BX
127 .in
128 .sp .5v
129 .fi
130 .\}
131 ..
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 .de BM
136 .if t \{\
137 .br
138 .ll -2n
139 .gcolor red
140 .di BX
141 .\}
142 ..
143 .de EM
144 .if t \{\
145 .br
146 .di
147 .ll
148 .gcolor
149 .nr BH \\n(dn
150 .ne \\n(BHu
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152 .in 0
153 .nf
154 .BX
155 .in
156 .fi
157 .\}
158 ..
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
163 .nh
164 .\" disable justification (adjust text to left margin only)
165 .ad l
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
169 .SH "Name"
170 amanda-auth \- Communication/Authentication methods between \fIAmanda\fR server and client
171 .SH "DESCRIPTION"
172 .PP
173 \fIAmanda\fR
174 offers 7 methods of communication between Amanda server (sometimes also called the tape server) and clients, each with its own authentication method\&. The desired communication method is specified by the
175 \fIauth\fR
176 parameter in the amanda\&.conf file (\fBamanda.conf\fR(5)) commonly as a dumptype\&. Valid values to the
177 \fIauth\fR
178 parameter are
179 \fBbsd\fR,
180 \fBbsdudp\fR,
181 \fBbsdtcp\fR,
182 \fBkrb4\fR,
183 \fBkrb5\fR,
184 \fBlocal\fR,
185 \fBrsh\fR, and
186 \fBssh\fR\&. Please note that
187 \fBkrb4\fR
188 will be removed in the next release\&. The authentication and communication method is used during the backup process
189 \fBamdump\fR
190 (amdump(8)) as well as the recovery process
191 \fBamrecover\fR
192 (amrecover(8))\&. For detailed information, please see http://wiki\&.zmanda\&.com/index\&.php/Server/Client_authentication\&.
193 .SH "COMPILATION AND GENERAL INFORMATION"
194 .PP
195 The communication method and thus type of authentication that will be used by the Amanda server is specified by the
196 \fIauth\fR
197 parameter in the dumptype for each disklist entry (DLE)\&. The
198 \fIauth\fR
199 parameter thus may be easily and globally specified in the "global" dumptype\&. If
200 \fIauth\fR
201 is not specified, the
202 \fBbsd\fR
203 communication method is used\&. See
204 \fBamanda.conf\fR(5)
205 for more information on Amanda configuration and dumptypes, and
206 \fBdisklist\fR(5)
207 for more information on disklists\&.
208 .PP
209 On the client side, the Amanda daemon
210 \fBamandad\fR
211 validates the connection depending on the value of the
212 \fBauth\fR
213 argument passed to it (see
214 \fIAmanda\fR(8))\&. Also, when it comes to recovery, the
215 \fBauth\fR
216 parameter can be specified in the
217 \fBamanda-client.conf\fR(5)
218 file to specify the communication method to be used by the client to the server\&.
219 .PP
220 When
221 \fIAmanda\fR
222 is being built from source code, desired communication and thus authentication methods (shown as "Authentication") must be specified as configure options at compilation time\&.
223 .sp
224 .nf
225 Authentication    Configure option(s)
226  bsd                    \-\-with\-bsd\-security      \-\-with\-amandahosts (pre\-2\&.6)
227  bsdtcp         \-\-with\-bsdtcp\-security   \-\-with\-amandahosts (pre\-2\&.6)
228  bsdudp         \-\-with\-bsdudp\-security   \-\-with\-amandahosts (pre\-2\&.6)
229  krb5           \-\-with\-krb5\-security
230  local           (always included)
231  rsh                    \-\-with\-rsh\-security
232  ssh                    \-\-with\-ssh\-security
233 .fi
234 .PP
235 There are additional configure options for
236 \fBbsd\fR,
237 \fBbsdudp\fR, and
238 \fBbsdtcp\fR
239 to allow for specifying explicit UDP and TCP port ranges\&.
240 .sp
241 .nf
242    \-\-with\-udpportrange
243    \-\-with\-tcpportrange
244    \-\-with\-low\-tcpportrange
245 .fi
246 .PP
247 See
248 \fBPORT USAGE\fR
249 below for more information\&.
250 .PP
251 There are additional configure options for Kerberos if you so desire\&. All but the last option are for Kerberos 4\&. Defaults shown in square brackets\&.
252 .sp
253 .nf
254    \-\-with\-server\-principal=ARG    server host principal  [amanda]
255    \-\-with\-server\-instance=ARG     server host instance   []
256    \-\-with\-server\-keyfile=ARG      server host key file   [/\&.amanda]
257    \-\-with\-client\-principal=ARG    client host principal  [rcmd]
258    \-\-with\-client\-instance=ARG     client host instance   [HOSTNAME_INSTANCE]
259    \-\-with\-client\-keyfile=ARG      client host key file   [KEYFILE]
260    \-\-with\-ticket\-lifetime=ARG     ticket lifetime        [128]
261    \-\-with\-krb4\-security=DIR       where libkrb\&.a lives   [see below]
262    \-\-with\-krb5\-security=DIR       where libkrb\&.a lives   [see below]
263 .fi
264 .PP
265 If configuring with \-\-with\-krb4\-security and/or \-\-with\-krb5\-security, the configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /usr/lib, and /opt/kerberos/lib for the kerberos bits, libkrb\&.a, in this order\&. Kerberos support will not be added if it does not find them\&. If the kerberos bits are found under some other hierarchy, you can specify this via \-\-with\-krb5\-security=DIR and/or \-\-with\-krb4\-security=DIR, where DIR is where the kerberos bits live\&. The configure script will then look in the \'lib\' directory under this hierarchy for libkrb\&.a\&.
266 .PP
267 The
268 \fBauth\fR
269 parameter selects a communication/authentication method to use between the client and the backup server\&. These methods are described each in their own section below\&.
270 .SH "BSD, BSDUDP, AND BSDTCP COMMUNICATION AND AUTHENTICATION"
271 .PP
272 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_bsd/bsdudp/bsdtcp_authentication\&.
273 .PP
274 The
275 \fBbsd\fR,
276 \fBbsdudp\fR, and
277 \fBbsdtcp\fR
278 communication methods use either UDP, TCP, or both protocols operating as a network service to authenticate and exchange data between server and clients\&.
279 .PP
280 In addition to compilation and general configuration (see
281 \fBCOMPILATION AND GENERAL INFORMATION\fR
282 above), the authentication method that the client is configured to receive is specified by the
283 \fBauth\fR
284 parameter in the network service configuration for
285 \fIAmanda\fR\&. The authentication method used by an Amanda client to reach the server during recovery is the authentication method specified by the
286 \fIauth\fR
287 parameter in the client\'s Amanda network service configuration or in its amanda\-client\&.conf file (see amanda\-client\&.conf(5))\&.
288 .SS "\&.amandahosts file"
289 .PP
290 Servers and clients using the bsd, bsdudp, and bsdtcp authentication methods refer to the \&.amandahosts file to control access\&. Amanda should be compiled for this access control if one of these methods will be used and is the default compilation option for Amanda 2\&.6 (use \-\-with\-amandahosts when compiling pre\-2\&.6 versions of Amanda)\&.
291 .PP
292 Amanda looks for the \&.amandahosts file in the Amanda user\'s home directory, commonly /var/lib/amanda\&.
293 .PP
294 Each authorization is on its own line in the following format
295 .PP
296 \fIhostname\fR
297 [
298 \fIusername\fR
299 [
300 \fIservice\&.\&.\&.\fR
301 ] ]
302 .PP
303 If
304 \fIusername\fR
305 is ommitted, it defaults to the user running
306 \fBamandad\fR, i\&.e\&. the user listed in the
307 \fBinetd\fR
308 or
309 \fBxinetd\fR
310 configuration file\&.
311 .PP
312 \fIservice\&.\&.\&.\fR
313 is a space\-delimited list of services the client is authorized to execute:
314 \fBnoop\fR,
315 \fBselfcheck\fR,
316 \fBsendsize\fR,
317 \fBsendbackup\fR,
318 \fBamdump\fR
319 (a shortcut for the previous four services which are required on clients),
320 \fBamindexd\fR, and
321 \fBamidxtaped\fR\&. The last two services are required on a server for clients to connect to it using
322 \fBamrecover\fR\&.
323 .PP
324 Example of the \&.amandahosts file on an Amanda client
325 .sp
326 .nf
327     \fBamandaserver\&.example\&.com   amandabackup   amdump\fR
328 .fi
329 .PP
330 Example of the \&.amandahosts file on an Amanda server
331 .sp
332 .nf
333     \fBamandaclient1\&.example\&.com   root   amindexd amidxtaped\fR
334 .fi
335 .SS "bsd communication and authentication"
336 .PP
337 The authentication is done using \&.amandahosts file in the Amanda user\'s home directory\&. The protocol between Amanda server and client is UDP\&. The number of disk list entries (DLEs)\-\-number of Amanda clients\-\-is limited by the UDP packet size\&. This authentication protocol will use a different port for each data stream (see PORT USAGE below)
338 .SS "bsdudp communication and authentication"
339 .PP
340 The authentication is done using \&.amandahosts files in the Amanda user\'s home directory\&. It uses UDP protocol between Amanda server and client for data and hence the number of DLEs is limited by the UDP packet size\&. It uses one TCP port to establish the connection and multiplexes all data streams using one port on the server (see PORT USAGE below)\&.
341 .SS "bsdtcp communication and authentication"
342 .PP
343 The authentication is done using \&.amandahosts files in the backup user\'s (for example: amandabackup) home directory\&. It uses TCP protocol between Amanda server and client\&. On the client, two reserved ports are used\&. On the server, all data streams are multiplexed to one port (see PORT USAGE below)\&.
344 .SS "USING INETD SERVER"
345 .PP
346 Template for Amanda client inetd service entry
347 .sp
348 .nf
349 \fI   service_name\fR \fIsocket_type\fR \fIprotocol\fR \fIwait/nowait\fR \fIamanda_backup_user\fR \fIabsolute_path_to_amandad\fR amandad \fIserver_args\fR
350 .fi
351 .PP
352 Client example of using
353 \fBbsd\fR
354 authorization for inetd server given Amanda user is "amandabackup":
355 .sp
356 .nf
357 \fB   amanda dgram udp wait amandabackup /path/to/amandad amandad \-auth=bsd amdump\fR
358 .fi
359 .PP
360 The same could be used for
361 \fBbsdudp\fR
362 if specifying \-auth=bsdudp instead of \-auth=bsd\&.
363 .PP
364 Client example of using
365 \fBbsdtcp\fR
366 authorization for inetd server given Amanda user is "amandabackup":
367 .sp
368 .nf
369 \fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump\fR
370 .fi
371 .PP
372 \fBamindexd\fR
373 and
374 \fBamidxtaped\fR
375 would typically be added at the end of the line as
376 \fBamandad\fR
377 server arguments for an Amanda server\&.
378 .PP
379 Server example of using
380 \fBbsdtcp\fR
381 authorization for inetd server given Amanda user is "amandabackup":
382 .sp
383 .nf
384 \fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump amindexd amidxtaped\fR
385 .fi
386 .PP
387 For Amanda version 2\&.5\&.0 and earlier, remember that neither
388 \fBbsdudp\fR
389 nor
390 \fBbsdtcp\fR
391 are supported and the Amanda daemon
392 \fBamandad\fR
393 accepts no arguments\&. Because of the latter,
394 \fBamrecover\fR
395 as of Amanda version 2\&.5\&.1 is not compatible with 2\&.5\&.0 and earlier servers\&. Thus, servers that are 2\&.5\&.0 or earlier must, in addition to the
396 \fIamanda\fR
397 service, run
398 \fIamindexd\fR
399 and
400 \fIamidxtaped\fR
401 Amanda services as their own network services, amandaidx and amidxtape, respectively (see below)\&.
402 .PP
403 There are no compatibility issues if server and clients are all 2\&.5\&.0 or earlier\&. If your server is 2\&.5\&.1 or later, you can still have clients that are 2\&.5\&.0 and earlier although you must then use
404 \fBbsd\fR
405 communication/authentication with these clients and must also run
406 \fIamindexd\fR
407 and
408 \fIamidxtaped\fR
409 Amanda services on the server as their own network services, amandaidx and amidxtape, respectively (see below)\&. If you have a server that is 2\&.5\&.0 and earlier, clients of a later version on which you wish to run
410 \fBamrecover\fR
411 must use
412 \fBamoldrecover\fR
413 instead and, again, the server must be running the amandaidx and amidxtape network services\&.
414 .PP
415 Example of amindexd and amidxtaped Amanda daemon services configured as their own network services for a 2\&.5\&.0 or earlier server or a newer server having 2\&.5\&.0 or earlier clients
416 .sp
417 .nf
418 \fB   amandaidx stream tcp nowait amanda /usr/local/libexec/amanda/current/amindexd   amindexd\fR
419 \fB   amidxtape stream tcp nowait amanda /usr/local/libexec/amanda/current/amidxtaped amidxtaped\fR
420 .fi
421 .SS "USING XINETD SERVER"
422 .PP
423 Template for Amanda client xinetd service file
424 .sp
425 .nf
426 service amanda
427 {
428         only_from               = \fIAmanda server\fR
429         socket_type             = \fIsocket type\fR
430         protocol                = \fIprotocol\fR
431         wait                    = \fIyes/no\fR
432         user                    = \fIamanda backup user\fR
433         group                   = \fIamanda backup user group id\fR
434         groups                  = yes
435         server                  = \fIabsolute path to amandad\fR
436         server_args             = \fIamandad server arguments\fR
437         disable                 = no
438 }
439 .fi
440 .PP
441 The
442 \fIonly_from\fR
443 parameter can be used with xinetd but is usually in addition to the primary form of access control via the \&.amandahosts file\&.
444 .PP
445 Client example of using
446 \fBbsd\fR
447 authorization for xinetd server and for Amanda user "amandabackup":
448 .sp
449 .nf
450 service amanda
451 {
452         only_from       = amandaserver\&.example\&.com
453         socket_type     = dgram
454         protocol        = udp
455         wait            = yes
456         user            = amandabackup
457         group           = disk
458         groups          = yes
459         server          = /path/to/amandad
460         server_args     = \-auth=bsd amdump
461         disable         = no 
462 }
463 .fi
464 .PP
465 The same could be used for
466 \fBbsdudp\fR
467 if specifying \-auth=bsdudp instead of \-auth=bsd\&.
468 .PP
469 Client example of using
470 \fBbsdtcp\fR
471 authorization for xinetd server and for Amanda user "amandabackup":
472 .sp
473 .nf
474 service amanda
475 {
476         only_from       = amandaserver\&.example\&.com amandaclient\&.example\&.com
477         socket_type     = stream
478         protocol        = tcp
479         wait            = no
480         user            = amandabackup
481         group           = disk
482         groups          = yes
483         server          = /path/to/amandad
484         server_args     = \-auth=bsdtcp amdump
485         disable         = no 
486 }
487 .fi
488 .PP
489 \fBamindexd\fR
490 and
491 \fBamidxtaped\fR
492 would typically be added as additional
493 \fBamandad\fR
494 \fIserver_args\fR
495 for an Amanda server\&.
496 .PP
497 For Amanda version 2\&.5\&.0 and earlier, remember that neither
498 \fBbsdudp\fR
499 nor
500 \fBbsdtcp\fR
501 are supported and the Amanda daemon
502 \fBamandad\fR
503 accepts no arguments\&. Because of the latter,
504 \fBamrecover\fR
505 as of Amanda version 2\&.5\&.1 is not compatible with 2\&.5\&.0 and earlier servers\&. Thus, servers that are 2\&.5\&.0 or earlier must, in addition to the
506 \fIamanda\fR
507 service, run
508 \fIamindexd\fR
509 and
510 \fIamidxtaped\fR
511 Amanda services as their own network services, amandaidx and amidxtape, respectively (see below)\&.
512 .PP
513 There are no compatibility issues if server and clients are all 2\&.5\&.0 or earlier\&. If your server is 2\&.5\&.1 or later, you can still have clients that are 2\&.5\&.0 and earlier although you must then use
514 \fBbsd\fR
515 communication/authentication with these clients and must also run
516 \fIamindexd\fR
517 and
518 \fIamidxtaped\fR
519 Amanda services on the server as their own network services, amandaidx and amidxtape, respectively (see below)\&. If you have a server that is 2\&.5\&.0 and earlier, clients of a later version on which you wish to run
520 \fBamrecover\fR
521 must use
522 \fBamoldrecover\fR
523 instead and, again, the server must be running the amandaidx and amidxtape network services\&.
524 .PP
525 Example of amindexd and amidxtaped Amanda daemon services configured as their own network services for a 2\&.5\&.0 or earlier server or a newer server having 2\&.5\&.0 or earlier clients
526 .sp
527 .nf
528 service amandaidx
529 {
530         socket_type             = stream
531         protocol                = tcp
532         wait                    = no
533         user                    = amanda
534         group                   = disk
535         server                  = /usr/local/libexec/amanda/amindexd 
536         disable                 = no
537 }
538
539 service amidxtape
540 {
541         socket_type             = stream
542         protocol                = tcp
543         wait                    = no
544         user                    = amanda
545         group                   = disk
546         server                  = /usr/local/libexec/amanda/amidxtaped
547         disable                 = no
548 }
549 .fi
550 .SS "PORT USAGE"
551 .PP
552 List of TCP/UDP ports used by network service communication methods for Amanda server and client\&.
553 .sp
554 .nf
555    Key:
556        UP = Unreserved Port
557     RPpAP = Reserved Port per Amanda Process
558    UPpDLE = Unreserved Port per DLE
559      [\&.\&.] = Configure options that can be used at compile time to define port ranges
560
561 Authentication  Protocol        Amanda server                                   Amanda client
562 bsd                     udp             1 RPpAP [\-\-with\-udpportrange]                10080
563                         tcp             1 UP [\-\-with\-tcpportrange]           3 UPpDLE [\-\-with\-tcpportrange]
564 bsdudp          udp             1 RPpAP [\-\-with\-udpportrange]                10080
565                         tcp             1 UP [\-with\-tcpportrange]             1 UPpDLE [\-\-with\-tcpportrange]
566 bsdtcp          tcp             1 RPpAP [\-\-with\-low\-tcpportrange]   10080
567 .fi
568 .PP
569 Amanda server also uses two ports (dumper process) to communicate with the chunker/taper processes\&. These ports are in the range set by \-\-with\-tcpportrange\&.
570 .PP
571 You can override the default port ranges that Amanda was compiled with in each configuration using the
572 \fIreserved\-udp\-port\fR,
573 \fIreserved\-tcp\-port\fR, and
574 \fIunreserved\-tcp\-port\fR
575 parameters in amanda\&.conf and amanda\-client\&.conf configuration files (see
576 \fBamanda.conf\fR(5)
577 and
578 \fBamanda-client.conf\fR(5))\&.
579 .SH "KERBEROS COMMUNICATION AND AUTHENTICATION"
580
581 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Kerberos_authentication\&.
582 .PP
583 Amanda supports Kerberos 4 and 5 communication methods between Amanda server and client\&. Please note, however, that support for Kerberos 4 will be removed in the next release\&.
584 .PP
585 General information including compilation are given above (see
586 \fBCOMPILATION AND GENERAL INFORMATION\fR
587 above)\&. Below sections give specific Kerberos 4 and 5 information\&.
588 .SS "KERBEROS v4"
589
590 Please note that support for Kerberos 4 will be removed in the next release\&.
591
592 Kerberos 4 uses UDP protocol and the number of DLEs is limited by UDP packet size\&.
593
594 The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
595
596     kamanda      10081/udp
597 .PP
598 And the /etc/inetd\&.conf line is:
599 .sp
600 .nf
601     kamanda dgram udp wait root /usr/local/libexec/amanda/amandad amandad \-auth=krb4
602 .fi
603 .PP
604 Note that you\'re running this as root, rather than as your dump user\&. AMANDA will set its uid down to the dump user at times it doesn\'t need to read the srvtab file, and give up root permissions entirely before it goes off and runs dump\&. Alternately you can change your srvtab files to be readable by user amanda\&.
605 .PP
606 The following dumptype options apply to krb4:
607 .sp
608 .nf
609 auth "krb4"    # use krb4 auth for this host
610                # (you can mingle krb hosts and bsd \&.rhosts in one conf)
611 kencrypt       # encrypt this filesystem over the net using the krb4
612                # session key\&.  About 2x slower\&.  Good for those root
613                # partitions containing your keyfiles\&.  Don\'t want to
614                # give away the keys to an ethernet sniffer!
615                # This is currently always enabled\&.  There is no
616                # way to disable it\&.  This is a bug\&.
617 .fi
618 .SS "KERBEROS v5"
619 .PP
620 Kerberos 5 uses TCP and the server uses only one TCP port and data streams are multiplexed to this port\&.
621
622
623 The \fBkrb5\fR driver script defaults to:
624
625 /*
626  * The lifetime of our tickets in minutes\&.
627  */
628 #define AMANDA_TKT_LIFETIME     (12*60)
629
630 /*
631  * The name of the service in /etc/services\&.
632  */
633 #define AMANDA_KRB5_SERVICE_NAME        "k5amanda"
634
635 You can currently only override these by editing the source code\&.
636
637 The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
638
639    k5amanda      10082/tcp
640 .PP
641 And the /etc/inetd\&.conf line is:
642 .sp
643 .nf
644    k5amanda stream tcp nowait root /usr/local/libexec/amanda/amandad amandad \-auth=krb5
645 .fi
646 .PP
647 Note that you\'re running this as root, rather than as your dump user\&. AMANDA will set its UID down to the dump user at times it doesn\'t need to read the keytab file, and give up root permissions entirely before it goes off and runs dump\&. Alternately you can change your keytab files to be readable by user amanda\&. You should understand the security implications of this before changing the permissions on the keytab\&.
648 .PP
649 The following dumptype options apply to
650 \fBkrb5\fR:
651 .sp
652 .nf
653    auth "krb5"    # use krb5 auth for this host
654                   # (you can mingle krb hosts and bsd \&.rhosts in one conf)
655 .fi
656 .PP
657 The principal and keytab files that Amanda uses must be set in the amanda\&.conf file for kerberos 5 dumps to work\&. You can hardcode this in the source code if you really want to (common\-src/krb5\-security\&.c)
658 .sp
659 .nf
660    krb5keytab
661    krb5principal
662 .fi
663 .PP
664 For example:
665 .sp
666 .nf
667    krb5keytab     "/etc/krb5\&.keytab\-amanda"
668    krb5principal  "amanda/saidin\&.omniscient\&.com"
669 .fi
670 .PP
671 The principal in the second option must be contained in the first\&. The keytab should be readable by the amanda user (and definitely not world readable!) and is (obviously) on the server\&. In MIT\'s kadmin, the following:
672 .sp
673 .nf
674    addprinc \-randkey amanda/saidin\&.omniscient\&.com
675    ktadd \-k /etc/krb5\&.keytab\-amanda amanda/saidin\&.omniscient\&.com
676 .fi
677 .PP
678 will do the trick\&. You will obviously want to change the principal name to reflect something appropriate for the conventions at your site\&.
679 .PP
680 You must also configure each client to allow the amanda principal in for dumps\&.
681 .PP
682 There are several ways to go about authorizing a server to connect to a client\&.
683 .PP
684 The normal way is via a \&.k5amandausers file or a \&.k5login file in the client user\'s home directory\&. The determination of which file to use is based on the way you ran configure on AMANDA\&. By default, AMANDA will use \&.k5amandahosts, but if you configured with \-\-without\-amandahosts, AMANDA will use \&.k5login\&. (similar to the default for \&.rhosts/\&.amandahosts\-style security)\&. The \&.k5login file syntax is a superset of the default
685 \fBkrb5\fR
686 \&.k5login\&. The routines to check it are implemented in amanda rather than using krb5_kuserok because the connections are actually gssapi based\&.
687 .PP
688 This \&.k5amandahosts/\&.k5login is a hybrid of the \&.amandahosts and a \&.k5login file\&. You can just list principal names, as in a \&.k5login file and the principal will be permitted in from any host\&. If you do NOT specify a realm, then there is no attempt to validate the realm (this is only really a concern if you have cross\-realm authentication set up with another realm or something else that allows you multiple realms in your kdc\&. If you do specify a realm, only that principal@realm will be permitted to connect\&.
689 .PP
690 You may prepend this with a hostname and whitespace, and only that principal (with optional realm as above) will be permitted to access from that hostname\&.
691 .PP
692 Here are examples of valid entries in the \&.k5amandahosts:
693 .sp
694 .nf
695    service/amanda
696    service/amanda@TEST\&.COM
697    dumpmaster\&.test\&.com service/amanda
698    dumpmaster\&.test\&.com service/amanda@TEST\&.COM
699 .fi
700 .PP
701 Rather than using a \&.k5amandahosts or \&.k5login file, the easiest way is to use a principal named after the destination user, (such as amanda@TEST\&.COM in our example) and not have either a \&.k5amandahosts or \&.k5login file in the destination user\'s home directory\&.
702 .PP
703 There is no attempt to verify the realm in this case (only a concern if you have cross\-realm authentication setup)\&.
704 .SH "LOCAL COMMUNICATION"
705 .PP
706 The Amanda server communicates with the client internally versus over the network, ie\&. the client is also the server\&.
707 .PP
708 This is the only method that requires no authentication as it is clearly not needed\&.
709 .SH "RSH COMMUNICATION AND AUTHENTICATION"
710
711 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_rsh_authentication\&.
712 .PP
713 The Amanda server communicates with its client as the Amanda user via the RSH protocol\&.
714 .PP
715 Please note that RSH protocol itself is insecure and should be used with caution especially on any servers and clients with public IPs\&.
716 .PP
717 Each Amanda client communicates with the server using one TCP port and all data streams from the client are multiplexed over one port\&. The number of Amanda clients is limited by the number of reserved ports available on the Amanda server\&. Some versions of RSH do not use reserved ports and, thus, this restriction is not valid\&.
718 .PP
719 General information including compilation is given above (see
720 \fBCOMPILATION AND GENERAL INFORMATION\fR
721 above)\&.
722 .PP
723 In addition to specifying the
724 \fIauth\fR
725 field in dumptype definition, it might be required to specify
726 \fIclient_username\fR
727 and
728 \fBamandad\fR
729 fields\&. If the backup user name is different on the Amanda client, the user name is specified as
730 \fBclient_username\fR\&. If the location of the Amanda daemon
731 \fBamandad\fR
732 is different on the Amanda client, the location is specified as
733 \fIamandad_path\fR
734 field value\&.
735 .sp
736 .nf
737 For example:
738 define dumptype rsh_example {
739          \&.\&.\&.
740          auth "rsh"
741          client_username "amandabackup"
742          amandad_path "/usr/lib/exec/amandad"
743          \&.\&.\&.
744 }
745 .fi
746 .SH "SSH COMMUNICATION AND AUTHENTICATION"
747
748 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_transport_encryption_with_SSH\&.
749
750 Amanda client sends data to the server using SSH\&. SSH keys have to be set up so that Amanda server can communicate with its clients using SSH\&.
751
752 General information including compilation is given above (see \fBCOMPILATION AND GENERAL INFORMATION\fR above)\&.
753
754 SSH provides transport encryption and authentication\&. To set up an SSH authentication session, Amanda will run the equivalent of the following to start the backup process\&.
755
756 \fB   /path/to/ssh \-l \fR\fB\fIuser_name\fR\fR\fB client\&.zmanda\&.com $libexecdir/amandad\fR
757
758 To use SSH, you need to set up SSH keys either by storing the passphrase in cleartext, using ssh\-agent, or using no passphrase at all\&.  All of these options have security implications which should be carefully considered before adoption\&.
759
760 When you use a public key on the client to do data encryption (see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_data_encryption), you can lock away the private key in a secure place\&. Both, transport and storage will be encrypted with such a setup\&. See http://wiki\&.zmanda\&.com/index\&.php/Encryption for an overview of encryption options\&.
761
762 Enable SSH authentication and set the ssh_keys option in all DLEs for that host by adding the following to the DLE itself or to the corresponding dumptype in amanda\&.conf:
763
764   auth "ssh"
765   ssh_keys "/home/amandabackup/\&.ssh/id_rsa_amdump"
766
767 \fIssh_keys\fR is the path to the private key on the client\&. If the username to which Amanda should connect is different from the default, then you should also add
768
769   client_username "otherusername"
770
771 If your server  \fBamandad\fR path and client  \fBamandad\fR path are different, you should also add
772
773   amandad_path "/client/amandad/path"
774 .PP
775 For a marginal increase in security, prepend the keys used for AMANDA in the clients\' authorized_keys file with the following:
776 .sp
777 .nf
778   from="amanda_server\&.your\&.domain\&.com",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,command="/absolute/path/to/amandad \-auth=ssh amdump"
779 .fi
780 .PP
781 This will limit that key to connect only from Amanda server and only be able to execute
782 \fBamandad\fR(8)\&.
783 .PP
784 In the same way, prepend the key used for AMANDA in the server\'s authorized_keys file with:
785 .sp
786 .nf
787   from="amanda_client\&.your\&.domain\&.com",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,command="/absolute/path/to/amandad \-auth=ssh amindexd amidxtaped"
788 .fi
789 .PP
790 You can omit the from=\&.\&. option if you have too many clients to list, although this has obvious security implications\&.
791 .PP
792 Set ssh_keys and any other necessary options in /etc/amanda/amanda_client\&.conf:
793 .sp
794 .nf
795   auth "ssh"
796   ssh_keys "/root/\&.ssh/id_rsa_amrecover"
797   client_username "amanda"
798   amandad_path "/server/amandad/path"
799 .fi
800 .PP
801 Besides user keys, SSH uses host keys to uniquely identify each host, to prevent one host from impersonating another\&. Unfortunately, the only easy way to set up these host keys is to make a connection and tell SSH that you trust the identity:
802 .sp
803 .nf
804   $ ssh client1\&.zmanda\&.com
805   The authenticity of host \'client1\&.zmanda\&.com (192\&.168\&.10\&.1)\' can\'t be established\&.
806   RSA key fingerprint is 26:4e:df:a2:be:c8:cb:20:1c:68:8b:cc:c0:3b:8e:9d\&.
807   Are you sure you want to continue connecting (yes/no)?yes
808 .fi
809 .PP
810 As Amanda will not answer this question itself, you must manually make every connection (server to client and client to server) that you expect Amanda to make\&. Note that you must use the same username that Amanda will use (that is, ssh client and ssh client\&.domain\&.com are distinct)\&.
811 .SH "SEE ALSO"
812 .PP
813
814 \fBamanda.conf\fR(5),
815 \fBamanda-client.conf\fR(5),
816 \fBdisklist\fR(5),
817 \fBamdump\fR(8),
818 \fBamrecover\fR(8)
819 : http://wiki.zmanda.com
820 .SH "Authors"
821 .PP
822 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
823 .RS 4
824 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[])
825 .RE
826 .PP
827 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
828 .RS 4
829 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[])
830 .RE
831 .PP
832 \fBPaul Yeatman\fR <\&pyeatman@zmanda\&.com\&>
833 .RS 4
834 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[])
835 .RE