第9章 信頼の設定

本セクションでは、コマンドラインを使用して、IdM に Identity Management (IdM)/Active Directory (AD) 信頼を設定する方法を説明します。

前提条件

9.1. 信頼用の IdM サーバーの準備

AD との信頼を確立する前に、IdM サーバーで ipa-adtrust-install ユーティリティーを使用して IdM ドメインを準備する必要があります。

注記

ipa-adtrust-install コマンドを自動的に実行するシステムは、AD 信頼コントローラーになります。ただし、ipa-adtrust-install は、IdM サーバーで 1 回のみ実行する必要があります。

前提条件

  • IdM サーバーがインストールされている。
  • パッケージをインストールし、IdM サービスを再起動するには、root 権限が必要です。

手順

  1. 必要なパッケージをインストールします。

    [root@ipaserver ~]# dnf install ipa-server-trust-ad samba-client
  2. IdM 管理ユーザーとして認証します。

    [root@ipaserver ~]# kinit admin
  3. ipa-adtrust-install ユーティリティーを実行します。

    [root@ipaserver ~]# ipa-adtrust-install

    統合 DNS サーバーとともに IdM がインストールされていると、DNS サービスレコードが自動的に作成されます。

    IdM が統合 DNS サーバーなしで IdM をインストールすると、ipa-adtrust-install は、続行する前に DNS に手動で追加する必要があるサービスレコードのリストを出力します。

  4. スクリプトにより、/etc/samba/smb.conf がすでに存在し、書き換えられることが求められます。

    WARNING: The smb.conf already exists. Running ipa-adtrust-install will break your existing Samba configuration.
    
    Do you wish to continue? [no]: yes
  5. このスクリプトは、従来の Linux クライアントが信頼できるユーザーと連携できるようにする互換性プラグインである slapi-nis プラグインを設定するように求めるプロンプトを表示します。

    Do you want to enable support for trusted domains in Schema Compatibility plugin?
    This will allow clients older than SSSD 1.9 and non-Linux clients to work with trusted users.
    
    Enable trusted domains support in slapi-nis? [no]: yes
  6. プロンプトが表示されたら、IdM ドメインの NetBIOS 名を入力するか、Enter を押して提案された名前を使用します。

    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 [IDM]:
  7. SID 生成タスクを実行して、既存ユーザーに SID を作成するように求められます。

    Do you want to run the ipa-sidgen task? [no]: yes

    これはリソースを集中的に使用するタスクであるため、ユーザー数が多い場合は別のタイミングで実行できます。

  8. (必要に応じて) デフォルトでは、Windows Server 2008 以降での動的 RPC ポートの範囲は 49152-65535 として定義されます。ご使用の環境に異なる動的 RPC ポート範囲を定義する必要がある場合は、Samba が異なるポートを使用するように設定し、ファイアウォール設定でそのポートを開くように設定します。以下の例では、ポート範囲を 55000-65000 に設定します。

    [root@ipaserver ~]# net conf setparm global 'rpc server dynamic port range' 55000-65000
    [root@ipaserver ~]# firewall-cmd --add-port=55000-65000/tcp
    [root@ipaserver ~]# firewall-cmd --runtime-to-permanent
  9. 信頼の DNS 設定の確認 に従って、DNS が適切に設定されていることを確認します。

    重要

    Red Hat では、IdM または AD が統合 DNS サーバーを使用しない場合に、ipa-adtrust-install を実行してから 信頼に対する DNS 設定の確認 に従って DNS 設定を検証することが強く推奨されます。

  10. ipa サービスを再起動します。

    [root@ipaserver ~]# ipactl restart
  11. smbclient ユーティリティーを使用して、Samba が IdM からの Kerberos 認証に応答することを確認します。

    [root@ipaserver ~]# smbclient -L server.idm.example.com -U user_name --use-kerberos=required
    lp_load_ex: changing to config backend registry
        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (Samba 4.15.2)
    ...