Red Hat Training

A Red Hat training course is available for RHEL 8

108.2. IdM クライアントでの Samba サーバーのインストールおよび設定

IdM ドメインに登録されたクライアントに Samba をインストールして設定できます。

前提条件

手順

  1. ipa-client-samba パッケージをインストールします。

    [root@idm_client]# yum install ipa-client-samba
  2. ipa-client-samba ユーティリティーを使用して、クライアントを準備し、初期 Samba 設定を作成します。

    [root@idm_client]# ipa-client-samba
    Searching for IPA server...
    IPA server: DNS discovery
    Chosen IPA master: idm_server.idm.example.com
    SMB principal to be created: cifs/idm_client.idm.example.com@IDM.EXAMPLE.COM
    NetBIOS name to be used: IDM_CLIENT
    Discovered domains to use:
    
     Domain name: idm.example.com
    NetBIOS name: IDM
             SID: S-1-5-21-525930803-952335037-206501584
        ID range: 212000000 - 212199999
    
     Domain name: ad.example.com
    NetBIOS name: AD
             SID: None
        ID range: 1918400000 - 1918599999
    
    Continue to configure the system with these values? [no]: yes
    Samba domain member is configured. Please check configuration at /etc/samba/smb.conf and start smb and winbind services
  3. デフォルトでは、ipa-client-samba は、ユーザーが接続したときにそのユーザーのホームディレクトリーを動的に共有するために、/etc/samba/smb.conf ファイルに [homes] セクションが自動的に追加されます。ユーザーがこのサーバーにホームディレクトリーがない場合、または共有したくない場合は、/etc/samba/smb.conf から次の行を削除します。

    [homes]
        read only = no
  4. ディレクトリーとプリンターを共有します。詳細は、次のセクションを参照してください。

  5. ローカルファイアウォールで Samba クライアントに必要なポートを開きます。

    [root@idm_client]# firewall-cmd --permanent --add-service=samba-client
    [root@idm_client]# firewall-cmd --reload
  6. smb サービスおよび winbind サービスを有効にして開始します。

    [root@idm_client]# systemctl enable --now smb winbind

検証手順

samba-client パッケージがインストールされている別の IdM ドメインメンバーで次の検証手順を実行します。

  • Kerberos 認証を使用して、Samba サーバー上の共有をリスト表示します。

    $ smbclient -L idm_client.idm.example.com -U user_name --use-kerberos=required
    lp_load_ex: changing to config backend registry
    
        Sharename       Type      Comment
        ---------       ----      -------
        example         Disk
        IPC$            IPC       IPC Service (Samba 4.15.2)
    ...

関連情報

  • ipa-client-samba(1) の man ページ