1.12 Шаг 8: Настройка Kerberos

1.12 Шаг 8: Настройка Kerberos

Kerberos configuration is handled by the krb.conf file. This file is typically located in the /etc directory, please refer to your distribution documentation for the location of this file on your system. Replace the existing file, if any, with the sample from /usr/local/samba/share/setup/krb5.conf. Edit the file and replace ${REALM} with the value you chose for the --realm parameter of the provision command above, make sure to enter the realm in uppercase letters:

Файлом конфигурации Kerberos является файл krb.conf. Обычно этот файл располагается в директории /etc. Если его там нет, то обратитесь к документации на ваш дистрибутив. Замените существующий файл файлом из папки /usr/local/samba/share/setup/krb5.conf. Найдите и замените переменную ${REALM} на значение ключа —realm, которое ранее указали в команде настройки домена, параметр вводится в верхнем регистре: Eng.

 [libdefaults]
     default_realm = SAMDOM.EXAMPLE.COM
     dns_lookup_realm = false
     dns_lookup_kdc = true

1.12.1 Тестирование Kerberos

The simplest test is to use the kinit command as follows:

Проведем простой тест с помощью команды kinit: Eng.

$ kinitadministrator@SAMDOM.EXAMPLE.COM
 Password:

*Note: You must specify your domain realm SAMDOM.EXAMPLE.COM in uppercase letters

* Замечание: Вводите доменное имя в верхнем регистре, вот так SAMDOM.EXAMPLE.COM. Eng.

kinit will not give you any output. To verify that Kerberos is working, and that you received a ticket, run the following:

Обратите внимание, команда kinit ничего не возвращает на консоль. Для того, чтобы проверить, получили ли мы билет (ticket) и что Kerberos работает дайте команду: Eng.

 $ klist
 Ticket cache:FILE:/tmp/krb5cc_1000
 Default principal:administrator@SAMDOM.EXAMPLE.COM
   Valid starting     Expires            Service principal
 02/10/10 19:39:48  02/11/10 19:39:46krbtgt/SAMDOM.EXAMPLE.COM@SAMDOM.EXAMPLE.COM

If either kinit or klist do not exist on your system, refer to Samba_4_OS_Requirements on how to install the necessary packages.

В случае отсутствия в вашей системе команд kinit или klist обратитесь к документу Samba 4, требования к операционной системе и установите все необходимые для работы контроллера домена пакеты. Eng.

You can also test Kerberos form a remote client, but you must first configure the client’s krb5.conf and resolve.conf as shown previously.

Вы можете протестировать Kerberos с клиентского компьютера, для этого на клиенте необходимо настроить файлы krb5.conf и resolve.conf, как это было описано ранее. Eng.

*Note: If you are using a client behind NAT then you have to add the following to the krb5.conf on the domain controller server:

* Замечание: При подключении клиента через NAT, необходимо добавить следующую строку в файл krb5.conf контроллера домена: Eng.

 [kdc]
     check-ticket-addresses = false

*Note: If provision generated you a password and you forgot it or didn’t get it saved in some way, you can use «samba-tool user setpassword administrator» as root to reset it.

* Замечание: если вы генерировали пароль администратора домена (на шаге настройки контроллера домена) и забыли его, то вы можете его сбросить, запустив от пользователя root команду «samba-tool user setpassword administrator». Eng.