本家様 https://www.freeipa.org/page/Main_Page


いろいろ試したけどFreeIPAドメイン外のwindows/macから smb共有フォルダ へのアクセスは現状はむりっぽい.

構築環境は RockyLinux 9.1 です

[root@freeipa ~]# cat /etc/redhat-release
Rocky Linux release 9.1 (Blue Onyx)
[root@freeipa ~]#


ただ RockyLinux 8.5 の時は「dnf module install ...」だったのに 9.1 となったら単一の選択肢になったみたい
ここではdnsは既に dnsmasq で DNS と dhcp を管理させている. なのでserver機能のみ入れることとしました. DNSサーバへの srv は未登録段階です

[root@freeipa ~]# dnf info ipa-server
Last metadata expiration check: 3:51:02 ago on Sun 01 Jan 2023 11:33:51 PM JST.
Available Packages
Name         : ipa-server
Version      : 4.10.0
Release      : 7.el9_1
Architecture : x86_64
Size         : 389 k
Source       : ipa-4.10.0-7.el9_1.src.rpm
Repository   : appstream
Summary      : The IPA authentication server
URL          : http://www.freeipa.org/
License      : GPLv3+
Description  : IPA is an integrated solution to provide centrally managed Identity (users,
             : hosts, services), Authentication (SSO, 2FA), and Authorization
             : (host access control, SELinux user roles, services). The solution provides
             : features for further integration with Linux based clients (SUDO, automount)
             : and integration with Active Directory based infrastructures (Trusts).
             : If you are installing an IPA server, you need to install this package.
[root@freeipa ~]# 
[root@freeipa ~]# dnf install ipa-server

このインストールで LDAP の「389-ds-base」、webサービスの「httpd」、kerberosサービスの「krb5-server」、nfsサービスの「nfs-utils」「autofs」らがインストールされます


ほぼほぼコマンドベースのウイザード「ipa-server-install」が用意されている. samba-adで言う所の「samba-tool domain provision」でしょうか
事前に「hostname」をFQDNへ、/etc/hostsに自信を登録が必要みたい ここではdnsmasqを使ってMACアドレスからIPと名前を貰っているので/etc/hostnameや/etc/hostsに自信が入っていない

[root@freeipa ~]# hostnamectl set-hostname `hostname -f`
[root@freeipa ~]# hostname
[root@freeipa ~]# cat /etc/hostname
[root@freeipa ~]# echo `hostname -I` `hostname -A` `hostname -s` >> /etc/hosts
[root@freeipa ~]# cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 freeipa.sybyl.local freeipa
[root@freeipa ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search sybyl.local
[root@freeipa ~]#


[root@freeipa ~]# man ipa-server-install
[root@freeipa ~]# ipa-server-install
The log file for this installation can be found in /var/log/ipaserver-install.log
This program will set up the IPA Server.
Version 4.10.0
This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the NTP client (chronyd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure SID generation
  * Configure the KDC to enable PKINIT
To accept the default shown in brackets, press the Enter key.
Do you want to configure integrated DNS (BIND)? [no]:                <--- 既に dnsmasq でdnsサーバを用意しているので不要[no]
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
Example: master.example.com.
Server host name [freeipa.sybyl.local]:                             <-- ホスト名は正しいのでそのままリターン
The domain name has been determined based on the host name.
Please confirm the domain name [sybyl.local]:                       <-- ドメイン名は正しいのでそのままリターン
The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.
Please provide a realm name [SYBYL.LOCAL]:                         <-- そのままリターン
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:                                        <--- Directory Managerのパスワード
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):
Trust is configured but no NetBIOS domain name found, setting it now.
Enter the NetBIOS name for the IPA domain.
Only up to 15 uppercase ASCII letters, digits and dashes are allowed.
Example: EXAMPLE.
NetBIOS domain name [SYBYL]:
Do you want to configure chrony with NTP server or pool address? [no]:           <-- 既に chrony でntpを用意しているので不要[no]
The IPA Master Server will be configured with:
Hostname:       freeipa.sybyl.local
IP address(es):
Domain name:    sybyl.local
Realm name:     SYBYL.LOCAL
The CA will be configured with:
Subject DN:   CN=Certificate Authority,O=SYBYL.LOCAL
Subject base: O=SYBYL.LOCAL
Chaining:     self-signed
Continue to configure the system with these values? [no]: yes           <--- 提示された値に同意なのでyes
The following operations may take some minutes to complete.
Please wait until the prompt is returned.
The ipa-client-install command was successful
Please add records in this file to your DNS system: /tmp/ipa.system.records.24x0tpp6.db  <-- この内容をDNSサーバに反映させます.
Setup complete
Next steps:
        1. You must make sure these network ports are open:
                TCP Ports:
                  * 80, 443: HTTP/HTTPS
                  * 389, 636: LDAP/LDAPS
                  * 88, 464: kerberos
                UDP Ports:
                  * 88, 464: kerberos
                  * 123: ntp
        2. You can now obtain a kerberos ticket using the command: 'kinit admin'
           This ticket will allow you to use the IPA tools (e.g., ipa user-add)
           and the web user interface.
Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
The ipa-server-install command was successful
[root@freeipa ~]#

設定完了とともにサービスが起動します. サービス名称は「ipa.service」

[root@freeipa ~]# systemctl status ipa
● ipa.service - Identity, Policy, Audit
     Loaded: loaded (/usr/lib/systemd/system/ipa.service; enabled; vendor preset: disabled)
     Active: active (exited) since Thu 2023-01-05 01:45:08 JST; 33s ago
    Process: 19663 ExecStart=/usr/sbin/ipactl start (code=exited, status=0/SUCCESS)
   Main PID: 19663 (code=exited, status=0/SUCCESS)
        CPU: 1.039s
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Assuming stale, cleaning and proceeding
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: ipa: INFO: The ipactl command was successful
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting Directory Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting krb5kdc Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting kadmin Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting httpd Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting ipa-custodia Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting pki-tomcatd Service
Jan 05 01:45:08 freeipa.sybyl.local ipactl[19663]: Starting ipa-otpd Service
Jan 05 01:45:08 freeipa.sybyl.local systemd[1]: Finished Identity, Policy, Audit.
[root@freeipa ~]#

作った設定を破棄して作り直すなら「ipa-server-install --uninstall」を実行します

[root@freeipa ~]# ipa-server-install --uninstall

「Please add records in this file to your DNS system」

「Please add records in this file to your DNS system: /tmp/ipa.system.records.24x0tpp6.db」と言われた中身がこれ

[root@freeipa ~]# cat /tmp/ipa.system.records.24x0tpp6.db
_kerberos-master._tcp.sybyl.local. 3600 IN SRV 0 100 88 freeipa.sybyl.local.
_kerberos-master._udp.sybyl.local. 3600 IN SRV 0 100 88 freeipa.sybyl.local.
_kerberos._tcp.sybyl.local. 3600 IN SRV 0 100 88 freeipa.sybyl.local.
_kerberos._udp.sybyl.local. 3600 IN SRV 0 100 88 freeipa.sybyl.local.
_kerberos.sybyl.local. 3600 IN TXT "SYBYL.LOCAL"
_kerberos.sybyl.local. 3600 IN URI 0 100 "krb5srv:m:tcp:freeipa.sybyl.local."
_kerberos.sybyl.local. 3600 IN URI 0 100 "krb5srv:m:udp:freeipa.sybyl.local."
_kpasswd._tcp.sybyl.local. 3600 IN SRV 0 100 464 freeipa.sybyl.local.
_kpasswd._udp.sybyl.local. 3600 IN SRV 0 100 464 freeipa.sybyl.local.
_kpasswd.sybyl.local. 3600 IN URI 0 100 "krb5srv:m:tcp:freeipa.sybyl.local."
_kpasswd.sybyl.local. 3600 IN URI 0 100 "krb5srv:m:udp:freeipa.sybyl.local."
_ldap._tcp.sybyl.local. 3600 IN SRV 0 100 389 freeipa.sybyl.local.
ipa-ca.sybyl.local. 3600 IN A
[root@freeipa ~]#

これを dnsmasq.conf に反映させるために下記のようにフォーマットを変換して追記する
稼働中のdnsmasqは 2.88 で「caa-record」レコードにも対応させてます

[root@c ~]# vi /etc/dnsmasq.conf
[root@c ~]# vi /etc/hosts
 : ipa-ca
[root@c ~]# systemctl restart dnsmasq


最後に firewall
「1. You must make sure these network ports are open:」

ただ「freeipa-4.xml」には ntp は入っていない. ここではntpサービスは他のマシンで運用しているの不要だが、もしFreeIPAサーバで ntp を提供するなら「freeipa-4.xml」と「ntp.xml」が必要かなと

[root@freeipa ~]# firewall-cmd --add-service=freeipa-4 --permanent --zone=public
[root@freeipa ~]# firewall-cmd --reload
[root@freeipa ~]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  services: cockpit dhcpv6-client freeipa-4 ssh
  forward: yes
  masquerade: no
  rich rules:
[root@freeipa ~]#

次に FreeIPA/nfsFreeIPA/clientFreeIPA/accountの順かなと思ってます

2024-02-23 2024-02-22 2024-02-21 2024-02-20 2024-02-19 2024-02-18 2024-02-17 2024-02-16 2024-02-13 2024-02-12 2024-02-09 2024-02-04 2024-02-03 2024-01-31 2024-01-30 2024-01-29 2024-01-28 2024-01-22 2024-01-16 2024-01-15 2024-01-13 2024-01-12 2024-01-09 2024-01-08 2024-01-07 2024-01-03 2023-12-22 2023-12-17 2023-12-16 2023-12-11 2023-12-09 2023-12-06 2023-11-30 2023-11-27 2023-11-21 2023-11-19 2023-11-18 2023-11-14 2023-11-10 2023-11-09 2023-11-05 2023-11-03 2023-10-30 2023-10-26


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-01-05 (木) 01:52:27