Show Table of Contents
27.2. Configuration Examples
27.2.1. Mapping SELinux users to IdM users
The following procedure shows how to create a new SELinux mapping and how to add a new IdM user to this mapping.
Procedure 27.1. How to Add a User to an SELinux Mapping
- To create a new SELinux mapping, enter the following command where
SELinux_mappingis the name of the new SELinux mapping and the--selinuxuseroption specifies a particular SELinux user:~]$
ipa selinuxusermap-add SELinux_mapping --selinuxuser=staff_u:s0-s0:c0.c1023 - Enter the following command to add an IdM user with the
tuseruser name to the SELinux mapping:~]$
ipa selinuxusermap-add-user --users=tuser SELinux_mapping - To add a new host named
ipaclient.example.comto the SELinux mapping, enter the following command:~]$
ipa selinuxusermap-add-host --hosts=ipaclient.example.com SELinux_mapping - The
tuseruser gets thestaff_u:s0-s0:c0.c1023label when logged in to the ipaclient.example.com host:[tuser@ipa-client]$
id -Zstaff_u:staff_r:staff_t:s0-s0:c0.c1023

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.