krb5/kadmind.init
Nalin Dahyabhai af9bedd61a - stop exporting kadmin keys to a keytab file when kadmind starts -- the
daemon's been able to use the database directly for a long long time
    now
- belatedly add aes128,aes256 to the default set of supported key types
2008-04-04 21:29:53 +00:00

95 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
#
# kadmind Start and stop the Kerberos 5 administrative server.
#
# chkconfig: - 35 65
# description: Kerberos 5 is a trusted third-party authentication system. \
# This script starts and stops the Kerberos 5 administrative \
# server, which should only be run on the master server for a \
# realm.
# processname: kadmind
# config: /etc/sysconfig/kadmin
#
# Get config.
. /etc/sysconfig/network
# Get config.
[ -r /etc/sysconfig/kadmin ] && . /etc/sysconfig/kadmin
# Source function library.
. /etc/init.d/functions
prog="Kerberos 5 Admin Server"
kadmind=/usr/kerberos/sbin/kadmind
RETVAL=0
# Shell functions to cut down on useless shell instances.
start() {
if [ ! -f /var/kerberos/krb5kdc/principal ] ; then
# Make an educated guess -- if they're using kldap somewhere,
# then we don't know for sure that this is an error.
if ! grep -q 'db_library.*=.*kldap' /etc/krb5.conf ; then
echo $"Error. Default principal database does not exist."
exit 1
fi
fi
if [ -f /var/kerberos/krb5kdc/kpropd.acl ] ; then
echo $"Error. This appears to be a slave server, found kpropd.acl"
exit 6
else
[ -x $kadmind ] || exit 5
fi
echo -n $"Starting $prog: "
daemon ${kadmind} ${KRB5REALM:+-r ${KRB5REALM}} $KADMIND_ARGS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/kadmin
}
stop() {
echo -n $"Stopping $prog: "
killproc ${kadmind}
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/kadmin
}
reload() {
echo -n $"Reopening $prog log file: "
killproc ${kadmind} -HUP
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status ${kadmind}
RETVAL=$?
;;
reload)
reload
;;
condrestart)
if [ -f /var/lock/subsys/kadmin ] ; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|condrestart|reload|restart}"
RETVAL=2
;;
esac
exit $RETVAL