3 .
/usr
/share
/debconf
/confmodule
5 if [ ! -f /var
/log
/heimdal-kdc.log
]
7 touch /var
/log
/heimdal-kdc.log
8 chmod 600 /var
/log
/heimdal-kdc.log
12 kadmin_entry
="kerberos-adm stream tcp nowait root /usr/sbin/tcpd /usr/lib/heimdal-servers/kadmind"
13 hprop_entry
="#krb_prop stream tcp nowait root /usr/sbin/tcpd /usr/sbin/hpropd"
15 update-inetd
--group KRB5
--add "$kadmin_entry"
16 update-inetd
--group KRB5
--add "$hprop_entry"
20 update-inetd
--pattern '[ \t]/usr/lib/heimdal-servers/kadmind' --enable kerberos-adm
23 # if not configured, try moving existing configuration
24 if [ ! -f /etc
/heimdal-kdc
/.configured
] &&
25 [ -f /var
/lib
/heimdal-kdc
/.configured
]
27 for i
in kdc.conf kadmind.acl
29 if [ -f /var
/lib
/heimdal-kdc
/$i ]
31 mv /var
/lib
/heimdal-kdc
/$i /etc
/heimdal-kdc
/$i
34 mv /var
/lib
/heimdal-kdc
/.configured
/etc
/heimdal-kdc
/.configured
37 # if already configured - dont reconfigure
38 if [ ! -f /etc
/heimdal-kdc
/.configured
]
41 # should use krb5-config setting???
42 if db_get krb5-config
/default_realm
&& [ "x$RET" != "x" ]
46 default_realm
="`hostname -d | tr a-z A-Z`"
48 db_fget heimdal
/realm seen
49 if [ "$RET" != "true" ]; then
50 db_set heimdal
/realm
"$default_realm"
52 db_subst heimdal
/realm default_realm
"$default_realm"
53 db_input medium heimdal
/realm || true
55 db_get heimdal
/realm
; REALM
="$RET"
58 db_input medium heimdal-kdc
/password || true
60 db_get heimdal-kdc
/password
; PASSWORD
="$RET"
61 db_set heimdal-kdc
/password
""
63 DST
=/etc
/heimdal-kdc
/kdc.conf
64 cp -a /usr
/share
/doc
/heimdal-kdc
/examples
/kdc.conf
"$DST"
65 # /usr/lib/heimdal-kdc/setconfig --file "$DST" --section realms::REALM.ORG "=$REALM"
67 DST
=/etc
/heimdal-kdc
/kadmind.acl
68 cp -a /usr
/share
/doc
/heimdal-kdc
/examples
/kadmind.acl
"$DST"
70 kstash
--master-key-fd=0 <<EOF
74 echo -e "\n\n" | kadmin
-l init
"$REALM" > /dev
/null
76 touch /etc
/heimdal-kdc
/.configured
80 abort-upgrade | abort-deconfigure | abort-remove
)
86 elif dpkg
--compare-versions "$2" le
"0.7.2.dfsg.1-6"
92 printf "$0: incorrect arguments: $*\n" >&2