Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

26.2. 設定の例

26.2.1. IdM ユーザーへの SELinux ユーザーのマッピング

以下の手順では、新しい SELinux マッピングを作成する方法と、このマッピングに新しい IdM ユーザーを追加する方法を示します。

手順26.1 SELinux マッピングにユーザーを追加する方法

  1. 新しい SELinux マッピングを作成するには、以下のコマンドを実行します。SELinux_mapping は新しい SELinux マッピングの名前で、--selinuxuser オプションは特定の SELinux ユーザーを指定します。
    ~]$ ipa selinuxusermap-add SELinux_mapping --selinuxuser=staff_u:s0-s0:c0.c1023
  2. 次のコマンドを実行して、tuser のユーザー名を持つ IdM ユーザーを SELinux マッピングに追加します。
    ~]$ ipa selinuxusermap-add-user --users=tuser SELinux_mapping
  3. ipaclient.example.com という名前の新しいホストを SELinux マッピングに追加するには、次のコマンドを実行します。
    ~]$ ipa selinuxusermap-add-host --hosts=ipaclient.example.com SELinux_mapping
  4. tuser ユーザーは、ipaclient.example.com ホストコンピューターにログインすると、staff_u:s0-s0:c0.c1023 ラベルを取得します。
    [tuser@ipa-client]$ id -Z
    staff_u:staff_r:staff_t:s0-s0:c0.c1023