SV-281250r1184704_rule
V-281250
SRG-OS-000324-GPOS-00125
RHEL-10-700410
CAT II
10
Configure RHEL 10 to elevate the SELinux context when an administrator calls the sudo command.
Edit a file in the "/etc/sudoers.d" directory with the following command:
$ sudo visudo -f /etc/sudoers.d/
Use the following example to build the file in the "/etc/sudoers.d" directory to allow any administrator belonging to a designated sudoers admin group to elevate their SELinux context with the use of the sudo command:
%{designated_group_or_user_name} ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL
Remove any configurations that conflict with the above from the following locations:
/etc/sudoers
/etc/sudoers.d/
Verify RHEL 10 elevates the SELinux context when an administrator calls the sudo command with the following command:
This command must be run as root:
$ sudo grep -r sysadm_r /etc/sudoers /etc/sudoers.d
%{designated_group_or_user_name} ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL
If a designated sudoers administrator group or account(s) is not configured to elevate the SELinux type and role to "sysadm_t" and "sysadm_r" with the use of the sudo command, this is a finding.
V-281250
False
RHEL-10-700410
Verify RHEL 10 elevates the SELinux context when an administrator calls the sudo command with the following command:
This command must be run as root:
$ sudo grep -r sysadm_r /etc/sudoers /etc/sudoers.d
%{designated_group_or_user_name} ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL
If a designated sudoers administrator group or account(s) is not configured to elevate the SELinux type and role to "sysadm_t" and "sysadm_r" with the use of the sudo command, this is a finding.
M
5733