Kerberos аутентификация в Microsoft AD
Задача: необходимо аутентифицироваться на linux сервере с помощью учетной записи на сервере Microsoft Active Directory.
Server
[root@server /]# yum install -y \
krb5-libs \
krb5-workstation
[root@server /]# cp /etc/krb5.conf /etc/krb5.conf.orig
[root@server /]# cat > /etc/krb5.conf << EOF
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = TEST.LOCAL
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
TEST.LOCAL = {
kdc = adserver.test.local
admin_server = adserver.test.local
}
[domain_realm]
.test.local = TEST.LOCAL
test.local = TEST.LOCAL
EOF
====================
# yum install -y pam_krb5
[root@server /]# vi /etc/pam.d/sshd
вставил сразу после #%PAM-1.0
auth sufficient pam_krb5.so
[root@server /]# useradd user1
========
Client
[root@client ~]# ssh user1@server