1,安装kerberos
yum install krb5-server
2,配置kerberos
vi /etc/krb5.conf
[libdefaults]
renew_lifetime = 7d
forwardable = true
default_realm = EXAMPLE.COM
ticket_lifetime = 24h
dns_lookup_realm = false
dns_lookup_kdc = false
#default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
#default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
[logging]
default = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
kdc = FILE:/var/log/krb5kdc.log
[realms]
EXAMPLE.COM = {
admin_server = bdtest09
kdc = bdtest09
}
3、生成数据库
kdb5_util create -r EXAMPLE.COM -s
4、创建管理用户
运行kadmin.local
addprinc admin/admin@EXAMPLE.COM
ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw
5、重启krb5kdc 和kadmin服务
/etc/init.d/krb5kdc restart
/etc/init.d/kadmin restart
6、本机测试客户端连接
kinit admin/admin