708fedd9ea
- v1.4 kadmin client requires a v1.4 kadmind on the server, or use the "-O" flag to specify that it should communicate with the server using the older protocol - new libkrb5support library - v5passwdd and kadmind4 are gone - versioned symbols - pick up $KRB5KDC_ARGS from /etc/sysconfig/krb5kdc, if it exists, and pass it on to krb5kdc - pick up $KADMIND_ARGS from /etc/sysconfig/kadmin, if it exists, and pass it on to kadmind - pick up $KRB524D_ARGS from /etc/sysconfig/krb524, if it exists, and pass it on to krb524d *instead of* "-m" - set "forwardable" in [libdefaults] in the default krb5.conf to match the default setting which we supply for pam_krb5 - set a default of 24h for "ticket_lifetime" in [libdefaults], reflecting the compiled-in default
95 lines
1.8 KiB
Bash
Executable File
95 lines
1.8 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
|
|
#
|
|
|
|
# Get config.
|
|
. /etc/sysconfig/network
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
# 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
|
|
exit 0
|
|
fi
|
|
if [ -f /var/kerberos/krb5kdc/kpropd.acl ] ; then
|
|
exit 0
|
|
else
|
|
if [ ! -f /var/kerberos/krb5kdc/kadm5.keytab ] ; then
|
|
echo -n $"Extracting kadm5 Service Keys: "
|
|
/usr/kerberos/sbin/kadmin.local -q "ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw" && success || failure
|
|
echo
|
|
fi
|
|
fi
|
|
echo -n $"Starting $prog: "
|
|
daemon ${kadmind} $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=1
|
|
;;
|
|
esac
|
|
|
|
exit $RETVAL
|