Fix KDB iteration when callback does write calls
[krb5.git] / doc / rst_source / krb_admins / install_kdc / kdc_prop_slave.rst
1 .. _kprop_to_slaves:
2
3 Propagate the database to each slave KDC
4 ========================================
5
6 First, create a dump file of the database on the master KDC, as
7 follows::
8
9     shell% /usr/local/sbin/kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans
10
11 Then, manually propagate the database to each slave KDC, as in the
12 following example::
13
14     shell% /usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans kerberos-1.mit.edu
15
16     Database propagation to kerberos-1.mit.edu: SUCCEEDED
17
18 You will need a script to dump and propagate the database. The
19 following is an example of a Bourne shell script that will do this.
20
21 .. note:: Remember that you need to replace ``/usr/local/var/krb5kdc``
22           with the name of the KDC state directory.
23
24 ::
25
26     #!/bin/sh
27
28     kdclist = "kerberos-1.mit.edu kerberos-2.mit.edu"
29
30     /usr/local/sbin/kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans
31
32     for kdc in $kdclist
33     do
34         /usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans $kdc
35     done
36
37 You will need to set up a cron job to run this script at the intervals
38 you decided on earlier (see :ref:`db_prop`).
39
40 Now that the slave KDC has a copy of the Kerberos database, you can
41 start the krb5kdc daemon::
42
43     shell% /usr/local/sbin/krb5kdc
44
45 As with the master KDC, you will probably want to add this command to
46 the KDCs' ``/etc/rc`` or ``/etc/inittab`` files, so they will start
47 the krb5kdc daemon automatically at boot time.
48
49
50 Propagation failed?
51 -------------------
52
53 .. _prop_failed_start:
54
55 .. error:: kprop: No route to host while connecting to server
56
57 Make sure that the hostname of the slave (as given to kprop) is
58 correct, and that any firewalls beween the master and the slave allow
59 a connection on port 754.
60
61 .. error:: kprop: Connection refused in call to connect while opening
62            connection
63
64 If the slave is intended to run kpropd out of inetd, make sure that
65 inetd is configured to accept krb5_prop connections.  inetd may need
66 to be restarted or sent a SIGHUP to recognize the new configuration.
67 If the slave is intended to run kpropd in standalone mode, make sure
68 that it is running.
69
70 .. error:: kprop: Server rejected authentication while authenticating
71            to server
72
73 Make sure that:
74
75 #. The time is syncronized between the master and slave KDCs.
76 #. The master stash file was copied from the master to the expected
77    location on the slave.
78 #. The slave has a keytab file in the default location containing a
79    ``host`` principal for the slave's hostname.
80
81 .. _prop_failed_end:
82
83
84 Feedback
85 --------
86
87 Please, provide your feedback or suggest a new topic at
88 krb5-bugs@mit.edu?subject=Documentation___install_kdc