FreeIPA

Материал из Wiki AlterOS
Перейти к: навигация, поиск

Условные обозначения

domain-alter.loc - имя домена
dc.domain-alter.loc - имя контроллера домена
workstation1.domain-alter.loc - имя  ПК для подключения к домену 
192.168.42.10 - статический адрес контроллера домена dc.domain-alter.loc 
192.168.42.1 шлюз сети 
dc сокращенное имя контроллера домена
8.8.8.8 DNS адрес сервера в сети интернет 

Настройка сервера

Устанавливаем необходимые пакеты:

  1. yum install bind bind-utils bind-dyndb-ldap ipa-server ipa-client ipa-server-dns ipa-server-trust-ad samba-client samba-winbind-clients

Настраиваем firewall, открывая порты для служб NTP, DHCP, DNS, FreeIPA или отключаем firewall на время настройки.


Отключаем SELinux


Устанавливаем имя машины

hostnamectl set-hostname dc.domain-alter.loc

Приводим файл /etc/hosts к виду:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1
localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.42.10 dc.domain-alter.loc dc

Приводим файл /etc/resolv.conf

search domain-alter.loc
nameserver  192.168.42.10

[root@dc etc]# ipa-server-install --realm=domain-alter.loc


Do you want to configure integrated DNS (BIND)? [no]: yes

Enter the fully qualified domain name of the computer on which you're setting up server software. Using the form <hostname>.<domainname> Example: master.example.com.


Server host name [dc.domain-alter.loc]:

Warning: skipping DNS resolution of host dc.domain-alter.loc The domain name has been determined based on the host name.

Please confirm the domain name [domain-alter.loc]:

Certain directory server operations require an administrative user. This user is referred to as the Directory Manager and has full access to the Directory for system management tasks and will be added to the instance of directory server created for IPA. The password must be at least 8 characters long.

Directory Manager password: Password (confirm):

The IPA server requires an administrative user, named 'admin'. This user is a regular system account used for IPA server administration.

IPA admin password: Password (confirm):

Checking DNS domain domain-alter.loc., please wait ... Do you want to configure DNS forwarders? [yes]: Following DNS servers are configured in /etc/resolv.conf: 192.168.42.1, 8.8.8.8 Do you want to configure these servers as DNS forwarders? [yes]: All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now: Enter an IP address for a DNS forwarder, or press Enter to skip: Checking DNS forwarders, please wait ... DNS server 192.168.42.1: answer to query '. SOA' is missing DNSSEC signatures (no RRSIG data) Please fix forwarder configuration to enable DNSSEC support. (For BIND 9 add directive "dnssec-enable yes;" to "options {}") WARNING: DNSSEC validation will be disabled Do you want to search for missing reverse zones? [yes]: Do you want to create reverse zone for IP 192.168.42.10 [yes]: Please specify the reverse zone name [42.168.192.in-addr.arpa.]: Using reverse zone(s) 42.168.192.in-addr.arpa.

The IPA Master Server will be configured with: Hostname: dc.domain-alter.loc IP address(es): 192.168.42.10 Domain name: domain-alter.loc Realm name: DOMAIN-ALTER.LOC

BIND DNS server will be configured to serve IPA domain with: Forwarders: 192.168.42.1, 8.8.8.8 Forward policy: only Reverse zone(s): 42.168.192.in-addr.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete. Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)

 [1/4]: stopping ntpd
 [2/4]: writing configuration
 [3/4]: configuring ntpd to start on boot
 [4/4]: starting ntpd

Done configuring NTP daemon (ntpd). Configuring directory server (dirsrv). Estimated time: 30 seconds

 [1/45]: creating directory server instance
 [2/45]: enabling ldapi
 [3/45]: configure autobind for root
 [4/45]: stopping directory server
 [5/45]: updating configuration in dse.ldif
 [6/45]: starting directory server
 [7/45]: adding default schema
 [8/45]: enabling memberof plugin
 [9/45]: enabling winsync plugin
 [10/45]: configuring replication version plugin
 [11/45]: enabling IPA enrollment plugin
 [12/45]: configuring uniqueness plugin
 [13/45]: configuring uuid plugin
 [14/45]: configuring modrdn plugin
 [15/45]: configuring DNS plugin
 [16/45]: enabling entryUSN plugin
 [17/45]: configuring lockout plugin
 [18/45]: configuring topology plugin
 [19/45]: creating indices
 [20/45]: enabling referential integrity plugin
 [21/45]: configuring certmap.conf
 [22/45]: configure new location for managed entries
 [23/45]: configure dirsrv ccache
 [24/45]: enabling SASL mapping fallback
 [25/45]: restarting directory server
 [26/45]: adding sasl mappings to the directory
 [27/45]: adding default layout
 [28/45]: adding delegation layout
 [29/45]: creating container for managed entries
 [30/45]: configuring user private groups
 [31/45]: configuring netgroups from hostgroups
 [32/45]: creating default Sudo bind user
 [33/45]: creating default Auto Member layout
 [34/45]: adding range check plugin
 [35/45]: creating default HBAC rule allow_all
 [36/45]: adding entries for topology management
 [37/45]: initializing group membership
 [38/45]: adding master entry
 [39/45]: initializing domain level
 [40/45]: configuring Posix uid/gid generation
 [41/45]: adding replication acis
 [42/45]: activating sidgen plugin
 [43/45]: activating extdom plugin
 [44/45]: tuning directory server
 [45/45]: configuring directory to start on boot

Done configuring directory server (dirsrv). Configuring Kerberos KDC (krb5kdc)

 [1/10]: adding kerberos container to the directory
 [2/10]: configuring KDC
 [3/10]: initialize kerberos container
 [4/10]: adding default ACIs
 [5/10]: creating a keytab for the directory
 [6/10]: creating a keytab for the machine
 [7/10]: adding the password extension to the directory
 [8/10]: creating anonymous principal
 [9/10]: starting the KDC
 [10/10]: configuring KDC to start on boot

Done configuring Kerberos KDC (krb5kdc). Configuring kadmin

 [1/2]: starting kadmin 
 [2/2]: configuring kadmin to start on boot

Done configuring kadmin. Configuring ipa-custodia

 [1/5]: Making sure custodia container exists
 [2/5]: Generating ipa-custodia config file
 [3/5]: Generating ipa-custodia keys
 [4/5]: starting ipa-custodia 
 [5/5]: configuring ipa-custodia to start on boot

Done configuring ipa-custodia. Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes

 [1/29]: configuring certificate server instance
 [2/29]: exporting Dogtag certificate store pin
 [3/29]: stopping certificate server instance to update CS.cfg
 [4/29]: backing up CS.cfg
 [5/29]: disabling nonces
 [6/29]: set up CRL publishing
 [7/29]: enable PKIX certificate path discovery and validation
 [8/29]: starting certificate server instance
 [9/29]: configure certmonger for renewals
 [10/29]: requesting RA certificate from CA
 [11/29]: setting up signing cert profile
 [12/29]: setting audit signing renewal to 2 years
 [13/29]: restarting certificate server





Проверка:


root@dc etc]# kinit admin@DOMAIN-ALTER.LOC Password for admin@DOMAIN-ALTER.LOC: [root@dc etc]# klist Ticket cache: KEYRING:persistent:0:0 Default principal: admin@DOMAIN-ALTER.LOC

Valid starting Expires Service principal 19.06.2020 15:54:01 20.06.2020 15:53:56 krbtgt/DOMAIN-ALTER.LOC@DOMAIN-ALTER.LOC


Подключение клиента

Задаем имя ПК

hostnamectl set-hostname workstation1.domain-alter.loc

Останавливаем службу chronyd

systemctl stop chronyd

Выключаем службу

systemctl disable chronyd

Устанавливаем необходимый пакет

yum install freeipa-client

Запускаем процедуру подключения к домену

 ipa-client-install --mkhomedir